Compare commits
1 commit
master
...
datadog-lo
Author | SHA1 | Date | |
---|---|---|---|
b21d7bfab7 |
247 changed files with 2128 additions and 5983 deletions
|
@ -7,13 +7,13 @@
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
tasks:
|
tasks:
|
||||||
- name: Login to Gitlab Docker Registry
|
- name: Login to Gitlab Docker Registry
|
||||||
'community.docker.docker_login':
|
docker_login:
|
||||||
registry_url: "{{ lookup('env', 'CI_REGISTRY') }}"
|
registry_url: "{{ lookup('env', 'CI_REGISTRY') }}"
|
||||||
username: "{{ lookup('env', 'CI_REGISTRY_USER') }}"
|
username: "{{ lookup('env', 'CI_REGISTRY_USER') }}"
|
||||||
password: "{{ lookup('env', 'CI_REGISTRY_PASSWORD') }}"
|
password: "{{ lookup('env', 'CI_REGISTRY_PASSWORD') }}"
|
||||||
reauthorize: yes
|
reauthorize: yes
|
||||||
- name: Replace Prod Container
|
- name: Replace Prod Container
|
||||||
'community.docker.docker_container':
|
docker_container:
|
||||||
name: GeekbotProd
|
name: GeekbotProd
|
||||||
image: "{{ lookup('env', 'IMAGE_TAG') }}"
|
image: "{{ lookup('env', 'IMAGE_TAG') }}"
|
||||||
recreate: yes
|
recreate: yes
|
||||||
|
@ -34,5 +34,5 @@
|
||||||
GEEKBOT_SENTRY: "{{ lookup('env', 'GEEKBOT_SENTRY') }}"
|
GEEKBOT_SENTRY: "{{ lookup('env', 'GEEKBOT_SENTRY') }}"
|
||||||
GEEKBOT_DB_REDSHIFT_COMPAT: "true"
|
GEEKBOT_DB_REDSHIFT_COMPAT: "true"
|
||||||
- name: Cleanup Old Container
|
- name: Cleanup Old Container
|
||||||
'community.docker.docker_prune':
|
docker_prune:
|
||||||
images: yes
|
images: yes
|
||||||
|
|
|
@ -5,12 +5,12 @@ stages:
|
||||||
- ops
|
- ops
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
VERSION: 4.4.0-V$CI_COMMIT_SHORT_SHA
|
VERSION: 4.3.0-$CI_COMMIT_SHORT_SHA
|
||||||
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||||
|
|
||||||
Build:
|
Build:
|
||||||
stage: build
|
stage: build
|
||||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
image: mcr.microsoft.com/dotnet/sdk:5.0
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1h
|
expire_in: 1h
|
||||||
paths:
|
paths:
|
||||||
|
@ -18,7 +18,7 @@ Build:
|
||||||
script:
|
script:
|
||||||
- dotnet restore
|
- dotnet restore
|
||||||
- dotnet test tests
|
- dotnet test tests
|
||||||
- dotnet publish --version-suffix "$VERSION" -r linux-x64 -c Release -p:DebugType=embedded --no-self-contained -o ./app ./src/Startup/
|
- dotnet publish --version-suffix $VERSION -r linux-x64 -c Release -o ./app ./src/Bot/
|
||||||
|
|
||||||
Package:
|
Package:
|
||||||
stage: docker
|
stage: docker
|
||||||
|
@ -34,7 +34,7 @@ Package:
|
||||||
|
|
||||||
Deploy:
|
Deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: quay.io/ansible/ansible-runner:stable-2.12-latest
|
image: ansible/ansible-runner
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
variables:
|
variables:
|
||||||
|
@ -46,7 +46,6 @@ Deploy:
|
||||||
- chmod -R 600 /root/.ssh
|
- chmod -R 600 /root/.ssh
|
||||||
- ssh-keyscan -p 65432 $PROD_IP > /root/.ssh/known_hosts
|
- ssh-keyscan -p 65432 $PROD_IP > /root/.ssh/known_hosts
|
||||||
script:
|
script:
|
||||||
- ansible-galaxy collection install -r ansible-requirements.yml
|
|
||||||
- ansible-playbook -i $PROD_IP, .deploy.yml
|
- ansible-playbook -i $PROD_IP, .deploy.yml
|
||||||
|
|
||||||
Sentry:
|
Sentry:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0
|
FROM mcr.microsoft.com/dotnet/aspnet:5.0
|
||||||
|
|
||||||
COPY ./app /app/
|
COPY ./app /app/
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web", "src\Web\Web.csproj",
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bot", "src\Bot\Bot.csproj", "{DBF79896-9F7F-443D-B336-155E276DFF16}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bot", "src\Bot\Bot.csproj", "{DBF79896-9F7F-443D-B336-155E276DFF16}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands", "src\Commands\Commands.csproj", "{7C771DFE-912A-4276-B0A6-047E09603F1E}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interactions", "src\Interactions\Interactions.csproj", "{FF6859D9-C539-4910-BE1E-9ECFED2F46FA}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Startup", "src\Startup\Startup.csproj", "{A691B018-4B19-4A7A-A0F6-DBB17641254F}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -39,18 +33,6 @@ Global
|
||||||
{DBF79896-9F7F-443D-B336-155E276DFF16}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{DBF79896-9F7F-443D-B336-155E276DFF16}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{DBF79896-9F7F-443D-B336-155E276DFF16}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{DBF79896-9F7F-443D-B336-155E276DFF16}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{DBF79896-9F7F-443D-B336-155E276DFF16}.Release|Any CPU.Build.0 = Release|Any CPU
|
{DBF79896-9F7F-443D-B336-155E276DFF16}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{7C771DFE-912A-4276-B0A6-047E09603F1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{7C771DFE-912A-4276-B0A6-047E09603F1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{7C771DFE-912A-4276-B0A6-047E09603F1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{7C771DFE-912A-4276-B0A6-047E09603F1E}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{FF6859D9-C539-4910-BE1E-9ECFED2F46FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{FF6859D9-C539-4910-BE1E-9ECFED2F46FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{FF6859D9-C539-4910-BE1E-9ECFED2F46FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{FF6859D9-C539-4910-BE1E-9ECFED2F46FA}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{A691B018-4B19-4A7A-A0F6-DBB17641254F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{A691B018-4B19-4A7A-A0F6-DBB17641254F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{A691B018-4B19-4A7A-A0F6-DBB17641254F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{A691B018-4B19-4A7A-A0F6-DBB17641254F}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
collections:
|
|
||||||
- name: community.docker
|
|
||||||
version: 2.7.0
|
|
|
@ -1,25 +1,34 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net5.0</TargetFramework>
|
||||||
|
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
|
||||||
|
<ApplicationIcon>derp.ico</ApplicationIcon>
|
||||||
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
||||||
<RootNamespace>Geekbot.Bot</RootNamespace>
|
<RootNamespace>Geekbot.Bot</RootNamespace>
|
||||||
<AssemblyName>Geekbot.Bot</AssemblyName>
|
<AssemblyName>Geekbot</AssemblyName>
|
||||||
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)</Version>
|
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)</Version>
|
||||||
<Version Condition=" '$(VersionSuffix)' == '' ">0.0.0-DEV</Version>
|
<Version Condition=" '$(VersionSuffix)' == '' ">0.0.0-DEV</Version>
|
||||||
|
<Company>Pizza and Coffee Studios</Company>
|
||||||
|
<Authors>Pizza and Coffee Studios</Authors>
|
||||||
|
<Description>A Discord bot</Description>
|
||||||
|
<RepositoryUrl>https://github.com/pizzaandcoffee/Geekbot.net</RepositoryUrl>
|
||||||
<NoWarn>NU1701</NoWarn>
|
<NoWarn>NU1701</NoWarn>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<RepositoryType>git</RepositoryType>
|
||||||
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
|
<PackageProjectUrl>https://geekbot.pizzaandcoffee.rocks</PackageProjectUrl>
|
||||||
<OutputType>Library</OutputType>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
<Optimize>true</Optimize>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CommandLineParser" Version="2.8.0" />
|
<PackageReference Include="CommandLineParser" Version="2.8.0" />
|
||||||
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.45.0.1929" />
|
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.45.0.1929" />
|
||||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.36" />
|
<PackageReference Include="HtmlAgilityPack" Version="1.11.24" />
|
||||||
<PackageReference Include="JikanDotNet" Version="1.6.0" />
|
<PackageReference Include="JikanDotNet" Version="1.5.1" />
|
||||||
<PackageReference Include="MtgApiManager.Lib" Version="1.2.2" />
|
<PackageReference Include="MtgApiManager.Lib" Version="1.2.2" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
<PackageReference Include="PokeApi.NET" Version="1.1.2" />
|
<PackageReference Include="PokeApi.NET" Version="1.1.2" />
|
||||||
<PackageReference Include="Sentry" Version="3.11.0" />
|
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Storage\*">
|
<Content Include="Storage\*">
|
||||||
|
@ -27,7 +36,113 @@
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Commands\Commands.csproj" />
|
|
||||||
<ProjectReference Include="..\Core\Core.csproj" />
|
<ProjectReference Include="..\Core\Core.csproj" />
|
||||||
|
<ProjectReference Include="..\Web\Web.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="Localization\Ship.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Ship.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="Localization\Rank.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Rank.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="Localization\Karma.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Karma.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="Localization\Internal.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Internal.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="Localization\Cookies.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Cookies.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="Localization\Roll.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Roll.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="Localization\Choose.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Choose.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="Localization\Admin.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Admin.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="Localization\Quote.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Quote.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="Localization\Role.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Role.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="Localization\Stats.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Stats.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="Localization\Ship.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>ship.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Localization\Rank.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Rank.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Localization\Ship.Designer.cs">
|
||||||
|
<DependentUpon>Ship.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Localization\Karma.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Karma.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Localization\Internal.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Internal.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Localization\Cookies.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Cookies.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Localization\Roll.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Roll.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Localization\Choose.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Choose.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Localization\Admin.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Admin.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Localization\Quote.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Quote.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Localization\Role.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Role.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Localization\Stats.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Stats.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,127 +0,0 @@
|
||||||
using System.Reflection;
|
|
||||||
using Discord;
|
|
||||||
using Discord.Commands;
|
|
||||||
using Discord.WebSocket;
|
|
||||||
using Geekbot.Bot.Handlers;
|
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.Database;
|
|
||||||
using Geekbot.Core.GlobalSettings;
|
|
||||||
using Geekbot.Core.GuildSettingsManager;
|
|
||||||
using Geekbot.Core.Logger;
|
|
||||||
using Geekbot.Core.Logger.Adapters;
|
|
||||||
using Geekbot.Core.ReactionListener;
|
|
||||||
using Geekbot.Core.UserRepository;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot;
|
|
||||||
|
|
||||||
public class BotStartup
|
|
||||||
{
|
|
||||||
private readonly IServiceCollection _serviceCollection;
|
|
||||||
private readonly GeekbotLogger _logger;
|
|
||||||
private readonly RunParameters _runParameters;
|
|
||||||
private readonly IGlobalSettings _globalSettings;
|
|
||||||
private DiscordSocketClient _client;
|
|
||||||
|
|
||||||
public BotStartup(IServiceCollection serviceCollection, GeekbotLogger logger, RunParameters runParameters, IGlobalSettings globalSettings)
|
|
||||||
{
|
|
||||||
_serviceCollection = serviceCollection;
|
|
||||||
_logger = logger;
|
|
||||||
_runParameters = runParameters;
|
|
||||||
_globalSettings = globalSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task Start()
|
|
||||||
{
|
|
||||||
_logger.Information(LogSource.Geekbot, "Connecting to Discord");
|
|
||||||
SetupDiscordClient();
|
|
||||||
await Login();
|
|
||||||
await _client.SetGameAsync(_globalSettings.GetKey("Game"));
|
|
||||||
_logger.Information(LogSource.Geekbot, $"Now Connected as {_client.CurrentUser.Username} to {_client.Guilds.Count} Servers");
|
|
||||||
|
|
||||||
_logger.Information(LogSource.Geekbot, "Registering Gateway Handlers");
|
|
||||||
await RegisterHandlers();
|
|
||||||
|
|
||||||
_logger.Information(LogSource.Geekbot, "Done and ready for use");
|
|
||||||
await Task.Delay(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetupDiscordClient()
|
|
||||||
{
|
|
||||||
_client = new DiscordSocketClient(new DiscordSocketConfig
|
|
||||||
{
|
|
||||||
GatewayIntents = GatewayIntents.DirectMessageReactions |
|
|
||||||
GatewayIntents.DirectMessages |
|
|
||||||
GatewayIntents.GuildMessageReactions |
|
|
||||||
GatewayIntents.GuildMessages |
|
|
||||||
GatewayIntents.GuildWebhooks |
|
|
||||||
GatewayIntents.GuildIntegrations |
|
|
||||||
GatewayIntents.GuildEmojis |
|
|
||||||
GatewayIntents.GuildBans |
|
|
||||||
GatewayIntents.Guilds |
|
|
||||||
GatewayIntents.GuildMembers,
|
|
||||||
LogLevel = LogSeverity.Verbose,
|
|
||||||
MessageCacheSize = 1000,
|
|
||||||
});
|
|
||||||
|
|
||||||
var discordLogger = new DiscordLogger(_logger);
|
|
||||||
_client.Log += discordLogger.Log;
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task Login()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var token = await GetToken();
|
|
||||||
await _client.LoginAsync(TokenType.Bot, token);
|
|
||||||
await _client.StartAsync();
|
|
||||||
while (!_client.ConnectionState.Equals(ConnectionState.Connected)) await Task.Delay(25);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
_logger.Error(LogSource.Geekbot, "Could not connect to Discord", e);
|
|
||||||
Environment.Exit(GeekbotExitCode.CouldNotLogin.GetHashCode());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task<string> GetToken()
|
|
||||||
{
|
|
||||||
var token = _runParameters.Token ?? _globalSettings.GetKey("DiscordToken");
|
|
||||||
if (string.IsNullOrEmpty(token))
|
|
||||||
{
|
|
||||||
Console.Write("Your bot Token: ");
|
|
||||||
var newToken = Console.ReadLine();
|
|
||||||
await _globalSettings.SetKey("DiscordToken", newToken);
|
|
||||||
await _globalSettings.SetKey("Game", "Ping Pong");
|
|
||||||
token = newToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
return token;
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task RegisterHandlers()
|
|
||||||
{
|
|
||||||
var applicationInfo = await _client.GetApplicationInfoAsync();
|
|
||||||
|
|
||||||
_serviceCollection.AddSingleton<DiscordSocketClient>(_client);
|
|
||||||
var serviceProvider = _serviceCollection.BuildServiceProvider();
|
|
||||||
|
|
||||||
var commands = new CommandService();
|
|
||||||
await commands.AddModulesAsync(Assembly.GetAssembly(typeof(BotStartup)), serviceProvider);
|
|
||||||
|
|
||||||
var commandHandler = new CommandHandler(_client, _logger, serviceProvider, commands, applicationInfo, serviceProvider.GetService<IGuildSettingsManager>());
|
|
||||||
var userHandler = new UserHandler(serviceProvider.GetService<IUserRepository>(), _logger, serviceProvider.GetService<DatabaseContext>(), _client);
|
|
||||||
var reactionHandler = new ReactionHandler(serviceProvider.GetService<IReactionListener>());
|
|
||||||
var statsHandler = new StatsHandler(_logger, serviceProvider.GetService<DatabaseContext>());
|
|
||||||
var messageDeletedHandler = new MessageDeletedHandler(serviceProvider.GetService<DatabaseContext>(), _logger, _client);
|
|
||||||
|
|
||||||
_client.MessageReceived += commandHandler.RunCommand;
|
|
||||||
_client.MessageDeleted += messageDeletedHandler.HandleMessageDeleted;
|
|
||||||
_client.UserJoined += userHandler.Joined;
|
|
||||||
_client.UserUpdated += userHandler.Updated;
|
|
||||||
_client.UserLeft += userHandler.Left;
|
|
||||||
_client.ReactionAdded += reactionHandler.Added;
|
|
||||||
_client.ReactionRemoved += reactionHandler.Removed;
|
|
||||||
if (!_runParameters.InMemory) _client.MessageReceived += statsHandler.UpdateStats;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -9,12 +9,11 @@ using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Discord.WebSocket;
|
using Discord.WebSocket;
|
||||||
using Geekbot.Bot.CommandPreconditions;
|
|
||||||
using Geekbot.Core;
|
using Geekbot.Core;
|
||||||
|
using Geekbot.Core.CommandPreconditions;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
using Geekbot.Core.Extensions;
|
using Geekbot.Core.Extensions;
|
||||||
using Geekbot.Core.GuildSettingsManager;
|
using Geekbot.Core.GuildSettingsManager;
|
||||||
using Localization = Geekbot.Core.Localization;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Admin
|
namespace Geekbot.Bot.Commands.Admin
|
||||||
{
|
{
|
||||||
|
|
38
src/Bot/Commands/Admin/Mod.cs
Normal file
38
src/Bot/Commands/Admin/Mod.cs
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord;
|
||||||
|
using Discord.Commands;
|
||||||
|
using Geekbot.Core.CommandPreconditions;
|
||||||
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
|
namespace Geekbot.Bot.Commands.Admin
|
||||||
|
{
|
||||||
|
[Group("mod")]
|
||||||
|
[RequireUserPermission(GuildPermission.KickMembers)]
|
||||||
|
[RequireUserPermission(GuildPermission.ManageMessages)]
|
||||||
|
[RequireUserPermission(GuildPermission.ManageRoles)]
|
||||||
|
[DisableInDirectMessage]
|
||||||
|
public class Mod : ModuleBase
|
||||||
|
{
|
||||||
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
public Mod(IErrorHandler errorHandler)
|
||||||
|
{
|
||||||
|
_errorHandler = errorHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Command("namehistory", RunMode = RunMode.Async)]
|
||||||
|
[Summary("See past usernames of an user")]
|
||||||
|
public async Task UsernameHistory([Summary("@someone")] IUser user)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await Context.Channel.SendMessageAsync("This command has been removed due to low usage and excessively high database usage");
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
await _errorHandler.HandleCommandException(e, Context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,15 +6,14 @@ using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Discord.Net;
|
using Discord.Net;
|
||||||
using Geekbot.Bot.CommandPreconditions;
|
|
||||||
using Geekbot.Core;
|
using Geekbot.Core;
|
||||||
|
using Geekbot.Core.CommandPreconditions;
|
||||||
using Geekbot.Core.Database;
|
using Geekbot.Core.Database;
|
||||||
using Geekbot.Core.Database.Models;
|
using Geekbot.Core.Database.Models;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
using Geekbot.Core.Extensions;
|
using Geekbot.Core.Extensions;
|
||||||
using Geekbot.Core.GuildSettingsManager;
|
using Geekbot.Core.GuildSettingsManager;
|
||||||
using Geekbot.Core.ReactionListener;
|
using Geekbot.Core.ReactionListener;
|
||||||
using Localization = Geekbot.Core.Localization;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Admin
|
namespace Geekbot.Bot.Commands.Admin
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,14 +3,13 @@ using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
using Geekbot.Core.Extensions;
|
using Geekbot.Core.Extensions;
|
||||||
using PokeAPI;
|
using PokeAPI;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Games
|
namespace Geekbot.Bot.Commands.Games
|
||||||
{
|
{
|
||||||
public class Pokedex : TransactionModuleBase
|
public class Pokedex : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
|
using Geekbot.Bot.Utils;
|
||||||
using Geekbot.Core;
|
using Geekbot.Core;
|
||||||
using Geekbot.Core.Database;
|
using Geekbot.Core.Database;
|
||||||
|
using Geekbot.Core.Database.Models;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
using Geekbot.Core.Extensions;
|
||||||
using Geekbot.Core.GuildSettingsManager;
|
using Geekbot.Core.GuildSettingsManager;
|
||||||
using Geekbot.Core.KvInMemoryStore;
|
using Geekbot.Core.KvInMemoryStore;
|
||||||
using Geekbot.Core.RandomNumberGenerator;
|
using Geekbot.Core.RandomNumberGenerator;
|
||||||
using Sentry;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Games.Roll
|
namespace Geekbot.Bot.Commands.Games.Roll
|
||||||
{
|
{
|
||||||
|
@ -31,20 +34,63 @@ namespace Geekbot.Bot.Commands.Games.Roll
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var res = await new Geekbot.Commands.Roll.Roll(_kvInMemoryStore, _database, _randomNumberGenerator)
|
var number = _randomNumberGenerator.Next(1, 100);
|
||||||
.RunFromGateway(
|
int.TryParse(stuff, out var guess);
|
||||||
Context.Guild.Id,
|
if (guess <= 100 && guess > 0)
|
||||||
Context.User.Id,
|
{
|
||||||
Context.User.Username,
|
var kvKey = $"{Context?.Guild?.Id ?? 0}:{Context.User.Id}:RollsPrevious";
|
||||||
stuff ?? "0"
|
|
||||||
);
|
var prevRoll = _kvInMemoryStore.Get<RollTimeout>(kvKey);
|
||||||
await ReplyAsync(res);
|
|
||||||
|
if (prevRoll?.LastGuess == guess && prevRoll?.GuessedOn.AddDays(1) > DateTime.Now)
|
||||||
|
{
|
||||||
|
await ReplyAsync(string.Format(
|
||||||
|
Localization.Roll.NoPrevGuess,
|
||||||
|
Context.Message.Author.Mention,
|
||||||
|
DateLocalization.FormatDateTimeAsRemaining(prevRoll.GuessedOn.AddDays(1))));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_kvInMemoryStore.Set(kvKey, new RollTimeout {LastGuess = guess, GuessedOn = DateTime.Now});
|
||||||
|
|
||||||
|
await ReplyAsync(string.Format(Localization.Roll.Rolled, Context.Message.Author.Mention, number, guess));
|
||||||
|
if (guess == number)
|
||||||
|
{
|
||||||
|
await ReplyAsync(string.Format(Localization.Roll.Gratz, Context.Message.Author));
|
||||||
|
var user = await GetUser(Context.User.Id);
|
||||||
|
user.Rolls += 1;
|
||||||
|
_database.Rolls.Update(user);
|
||||||
|
await _database.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await ReplyAsync(string.Format(Localization.Roll.RolledNoGuess, Context.Message.Author.Mention, number));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
await ErrorHandler.HandleCommandException(e, Context);
|
await ErrorHandler.HandleCommandException(e, Context);
|
||||||
Transaction.Status = SpanStatus.InternalError;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task<RollsModel> GetUser(ulong userId)
|
||||||
|
{
|
||||||
|
var user = _database.Rolls.FirstOrDefault(u => u.GuildId.Equals(Context.Guild.Id.AsLong()) && u.UserId.Equals(userId.AsLong())) ?? await CreateNewRow(userId);
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<RollsModel> CreateNewRow(ulong userId)
|
||||||
|
{
|
||||||
|
var user = new RollsModel()
|
||||||
|
{
|
||||||
|
GuildId = Context.Guild.Id.AsLong(),
|
||||||
|
UserId = userId.AsLong(),
|
||||||
|
Rolls = 0
|
||||||
|
};
|
||||||
|
var newUser = _database.Rolls.Add(user).Entity;
|
||||||
|
await _database.SaveChangesAsync();
|
||||||
|
return newUser;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Geekbot.Commands.Roll
|
namespace Geekbot.Bot.Commands.Games.Roll
|
||||||
{
|
{
|
||||||
public record RollTimeout
|
public class RollTimeout
|
||||||
{
|
{
|
||||||
public int LastGuess { get; set; }
|
public int LastGuess { get; set; }
|
||||||
public DateTime GuessedOn { get; set; }
|
public DateTime GuessedOn { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -10,7 +10,7 @@ using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Integrations.LolMmr
|
namespace Geekbot.Bot.Commands.Integrations.LolMmr
|
||||||
{
|
{
|
||||||
public class LolMmr : TransactionModuleBase
|
public class LolMmr : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
@ -46,9 +46,9 @@ namespace Geekbot.Bot.Commands.Integrations.LolMmr
|
||||||
|
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.AppendLine($"**MMR for {summonerName}**");
|
sb.AppendLine($"**MMR for {summonerName}**");
|
||||||
sb.AppendLine($"Normal: {data.Normal?.Avg ?? 0}");
|
sb.AppendLine($"Normal: {data.Normal.Avg}");
|
||||||
sb.AppendLine($"Ranked: {data.Ranked?.Avg ?? 0}");
|
sb.AppendLine($"Ranked: {data.Ranked.Avg}");
|
||||||
sb.AppendLine($"ARAM: {data.ARAM?.Avg ?? 0}");
|
sb.AppendLine($"ARAM: {data.ARAM.Avg}");
|
||||||
|
|
||||||
await Context.Channel.SendMessageAsync(sb.ToString());
|
await Context.Channel.SendMessageAsync(sb.ToString());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,9 @@
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Integrations.LolMmr
|
namespace Geekbot.Bot.Commands.Integrations.LolMmr
|
||||||
{
|
{
|
||||||
public class LolMmrDto
|
public class LolMmrDto
|
||||||
{
|
{
|
||||||
[JsonPropertyName("ranked")]
|
|
||||||
public LolMrrInfoDto Ranked { get; set; }
|
public LolMrrInfoDto Ranked { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("normal")]
|
|
||||||
public LolMrrInfoDto Normal { get; set; }
|
public LolMrrInfoDto Normal { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("aram")]
|
|
||||||
public LolMrrInfoDto ARAM { get; set; }
|
public LolMrrInfoDto ARAM { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
using System.Text.Json.Serialization;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Integrations.LolMmr
|
namespace Geekbot.Bot.Commands.Integrations.LolMmr
|
||||||
{
|
{
|
||||||
public class LolMrrInfoDto
|
public class LolMrrInfoDto
|
||||||
{
|
{
|
||||||
[JsonPropertyName("avg")]
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public decimal? Avg { get; set; }
|
public decimal Avg { get; set; } = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,7 +4,6 @@ using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.Converters;
|
using Geekbot.Core.Converters;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
using Geekbot.Core.Extensions;
|
using Geekbot.Core.Extensions;
|
||||||
|
@ -12,7 +11,7 @@ using MtgApiManager.Lib.Service;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Integrations
|
namespace Geekbot.Bot.Commands.Integrations
|
||||||
{
|
{
|
||||||
public class MagicTheGathering : TransactionModuleBase
|
public class MagicTheGathering : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
private readonly IMtgManaConverter _manaConverter;
|
private readonly IMtgManaConverter _manaConverter;
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
namespace Geekbot.Bot.Commands.Integrations.UbranDictionary
|
||||||
|
{
|
||||||
|
internal class UrbanListItemDto
|
||||||
|
{
|
||||||
|
public string Definition { get; set; }
|
||||||
|
public string Permalink { get; set; }
|
||||||
|
public string ThumbsUp { get; set; }
|
||||||
|
public string Word { get; set; }
|
||||||
|
public string Example { get; set; }
|
||||||
|
public string ThumbsDown { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Geekbot.Bot.Commands.Integrations.UbranDictionary
|
||||||
|
{
|
||||||
|
internal class UrbanResponseDto
|
||||||
|
{
|
||||||
|
public string[] Tags { get; set; }
|
||||||
|
public List<UrbanListItemDto> List { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord;
|
||||||
|
using Discord.Commands;
|
||||||
|
using Geekbot.Core;
|
||||||
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
using Geekbot.Core.Extensions;
|
||||||
|
|
||||||
|
namespace Geekbot.Bot.Commands.Integrations.UbranDictionary
|
||||||
|
{
|
||||||
|
public class UrbanDictionary : ModuleBase
|
||||||
|
{
|
||||||
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
public UrbanDictionary(IErrorHandler errorHandler)
|
||||||
|
{
|
||||||
|
_errorHandler = errorHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Command("urban", RunMode = RunMode.Async)]
|
||||||
|
[Summary("Lookup something on urban dictionary")]
|
||||||
|
public async Task UrbanDefine([Remainder] [Summary("word")] string word)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var definitions = await HttpAbstractions.Get<UrbanResponseDto>(new Uri($"https://api.urbandictionary.com/v0/define?term={word}"));
|
||||||
|
if (definitions.List.Count == 0)
|
||||||
|
{
|
||||||
|
await ReplyAsync("That word hasn't been defined...");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var definition = definitions.List.First(e => !string.IsNullOrWhiteSpace(e.Example));
|
||||||
|
|
||||||
|
var eb = new EmbedBuilder();
|
||||||
|
eb.WithAuthor(new EmbedAuthorBuilder
|
||||||
|
{
|
||||||
|
Name = definition.Word,
|
||||||
|
Url = definition.Permalink
|
||||||
|
});
|
||||||
|
eb.WithColor(new Color(239, 255, 0));
|
||||||
|
|
||||||
|
static string ShortenIfToLong(string str, int maxLength) => str.Length > maxLength ? $"{str.Substring(0, maxLength - 5)}[...]" : str;
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(definition.Definition)) eb.Description = ShortenIfToLong(definition.Definition, 1800);
|
||||||
|
if (!string.IsNullOrEmpty(definition.Example)) eb.AddField("Example", ShortenIfToLong(definition.Example, 1024));
|
||||||
|
if (!string.IsNullOrEmpty(definition.ThumbsUp)) eb.AddInlineField("Upvotes", definition.ThumbsUp);
|
||||||
|
if (!string.IsNullOrEmpty(definition.ThumbsDown)) eb.AddInlineField("Downvotes", definition.ThumbsDown);
|
||||||
|
if (definitions.Tags?.Length > 0) eb.AddField("Tags", string.Join(", ", definitions.Tags));
|
||||||
|
|
||||||
|
await ReplyAsync("", false, eb.Build());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
await _errorHandler.HandleCommandException(e, Context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,39 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Discord.Commands;
|
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.ErrorHandling;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Integrations
|
|
||||||
{
|
|
||||||
public class UrbanDictionary : TransactionModuleBase
|
|
||||||
{
|
|
||||||
private readonly IErrorHandler _errorHandler;
|
|
||||||
|
|
||||||
public UrbanDictionary(IErrorHandler errorHandler)
|
|
||||||
{
|
|
||||||
_errorHandler = errorHandler;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Command("urban", RunMode = RunMode.Async)]
|
|
||||||
[Summary("Lookup something on urban dictionary")]
|
|
||||||
public async Task UrbanDefine([Remainder] [Summary("word")] string word)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var eb = await Geekbot.Commands.UrbanDictionary.UrbanDictionary.Run(word);
|
|
||||||
if (eb == null)
|
|
||||||
{
|
|
||||||
await ReplyAsync("That word hasn't been defined...");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await ReplyAsync(string.Empty, false, eb.ToDiscordNetEmbed().Build());
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
await _errorHandler.HandleCommandException(e, Context);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -5,7 +5,6 @@ using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.Database;
|
using Geekbot.Core.Database;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
using Geekbot.Core.Extensions;
|
using Geekbot.Core.Extensions;
|
||||||
|
@ -15,7 +14,7 @@ using HtmlAgilityPack;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Integrations
|
namespace Geekbot.Bot.Commands.Integrations
|
||||||
{
|
{
|
||||||
public class Wikipedia : TransactionModuleBase
|
public class Wikipedia : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
private readonly IWikipediaClient _wikipediaClient;
|
private readonly IWikipediaClient _wikipediaClient;
|
||||||
|
|
|
@ -1,59 +1,58 @@
|
||||||
using Discord.Commands;
|
using System;
|
||||||
using Geekbot.Core;
|
using System.Threading.Tasks;
|
||||||
// using Geekbot.Core.ErrorHandling;
|
using Discord.Commands;
|
||||||
// using Geekbot.Core.GlobalSettings;
|
using Geekbot.Core.ErrorHandling;
|
||||||
// using Google.Apis.Services;
|
using Geekbot.Core.GlobalSettings;
|
||||||
// using Google.Apis.YouTube.v3;
|
using Google.Apis.Services;
|
||||||
|
using Google.Apis.YouTube.v3;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Integrations
|
namespace Geekbot.Bot.Commands.Integrations
|
||||||
{
|
{
|
||||||
public class Youtube : TransactionModuleBase
|
public class Youtube : ModuleBase
|
||||||
{
|
{
|
||||||
// private readonly IGlobalSettings _globalSettings;
|
private readonly IGlobalSettings _globalSettings;
|
||||||
// private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
// public Youtube(IGlobalSettings globalSettings, IErrorHandler errorHandler)
|
public Youtube(IGlobalSettings globalSettings, IErrorHandler errorHandler)
|
||||||
// {
|
{
|
||||||
// _globalSettings = globalSettings;
|
_globalSettings = globalSettings;
|
||||||
// _errorHandler = errorHandler;
|
_errorHandler = errorHandler;
|
||||||
// }
|
}
|
||||||
|
|
||||||
[Command("yt", RunMode = RunMode.Async)]
|
[Command("yt", RunMode = RunMode.Async)]
|
||||||
[Summary("Search for something on youtube.")]
|
[Summary("Search for something on youtube.")]
|
||||||
public async Task Yt([Remainder] [Summary("title")] string searchQuery)
|
public async Task Yt([Remainder] [Summary("title")] string searchQuery)
|
||||||
{
|
{
|
||||||
await ReplyAsync("The youtube command is temporarily disabled");
|
var key = _globalSettings.GetKey("YoutubeKey");
|
||||||
|
if (string.IsNullOrEmpty(key))
|
||||||
// var key = _globalSettings.GetKey("YoutubeKey");
|
{
|
||||||
// if (string.IsNullOrEmpty(key))
|
await ReplyAsync("No youtube key set, please tell my senpai to set one");
|
||||||
// {
|
return;
|
||||||
// await ReplyAsync("No youtube key set, please tell my senpai to set one");
|
}
|
||||||
// return;
|
|
||||||
// }
|
try
|
||||||
//
|
{
|
||||||
// try
|
var youtubeService = new YouTubeService(new BaseClientService.Initializer
|
||||||
// {
|
{
|
||||||
// var youtubeService = new YouTubeService(new BaseClientService.Initializer
|
ApiKey = key,
|
||||||
// {
|
ApplicationName = GetType().ToString()
|
||||||
// ApiKey = key,
|
});
|
||||||
// ApplicationName = GetType().ToString()
|
|
||||||
// });
|
var searchListRequest = youtubeService.Search.List("snippet");
|
||||||
//
|
searchListRequest.Q = searchQuery;
|
||||||
// var searchListRequest = youtubeService.Search.List("snippet");
|
searchListRequest.MaxResults = 2;
|
||||||
// searchListRequest.Q = searchQuery;
|
|
||||||
// searchListRequest.MaxResults = 2;
|
var searchListResponse = await searchListRequest.ExecuteAsync();
|
||||||
//
|
|
||||||
// var searchListResponse = await searchListRequest.ExecuteAsync();
|
var result = searchListResponse.Items[0];
|
||||||
//
|
|
||||||
// var result = searchListResponse.Items[0];
|
await ReplyAsync(
|
||||||
//
|
$"\"{result.Snippet.Title}\" from \"{result.Snippet.ChannelTitle}\" https://youtu.be/{result.Id.VideoId}");
|
||||||
// await ReplyAsync(
|
}
|
||||||
// $"\"{result.Snippet.Title}\" from \"{result.Snippet.ChannelTitle}\" https://youtu.be/{result.Id.VideoId}");
|
catch (Exception e)
|
||||||
// }
|
{
|
||||||
// catch (Exception e)
|
await _errorHandler.HandleCommandException(e, Context);
|
||||||
// {
|
}
|
||||||
// await _errorHandler.HandleCommandException(e, Context);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -2,13 +2,12 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
using Geekbot.Core.RandomNumberGenerator;
|
using Geekbot.Core.RandomNumberGenerator;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness
|
namespace Geekbot.Bot.Commands.Randomness
|
||||||
{
|
{
|
||||||
public class BenedictCumberbatchNameGenerator : TransactionModuleBase
|
public class BenedictCumberbatchNameGenerator : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
private readonly IRandomNumberGenerator _randomNumberGenerator;
|
private readonly IRandomNumberGenerator _randomNumberGenerator;
|
||||||
|
|
|
@ -7,7 +7,7 @@ using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness.Cat
|
namespace Geekbot.Bot.Commands.Randomness.Cat
|
||||||
{
|
{
|
||||||
public class Cat : TransactionModuleBase
|
public class Cat : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
using System.Text.Json.Serialization;
|
namespace Geekbot.Bot.Commands.Randomness.Cat
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness.Cat
|
|
||||||
{
|
{
|
||||||
internal class CatResponseDto
|
internal class CatResponseDto
|
||||||
{
|
{
|
||||||
[JsonPropertyName("file")]
|
|
||||||
public string File { get; set; }
|
public string File { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,10 +1,7 @@
|
||||||
using System.Text.Json.Serialization;
|
namespace Geekbot.Bot.Commands.Randomness.Chuck
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness.Chuck
|
|
||||||
{
|
{
|
||||||
internal class ChuckNorrisJokeResponseDto
|
internal class ChuckNorrisJokeResponseDto
|
||||||
{
|
{
|
||||||
[JsonPropertyName("value")]
|
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -7,7 +7,7 @@ using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness.Chuck
|
namespace Geekbot.Bot.Commands.Randomness.Chuck
|
||||||
{
|
{
|
||||||
public class ChuckNorrisJokes : TransactionModuleBase
|
public class ChuckNorrisJokes : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
using System.Text.Json.Serialization;
|
namespace Geekbot.Bot.Commands.Randomness.Dad
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness.Dad
|
|
||||||
{
|
{
|
||||||
internal class DadJokeResponseDto
|
internal class DadJokeResponseDto
|
||||||
{
|
{
|
||||||
[JsonPropertyName("joke")]
|
|
||||||
public string Joke { get; set; }
|
public string Joke { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -6,7 +6,7 @@ using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness.Dad
|
namespace Geekbot.Bot.Commands.Randomness.Dad
|
||||||
{
|
{
|
||||||
public class DadJokes : TransactionModuleBase
|
public class DadJokes : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness.Dog
|
namespace Geekbot.Bot.Commands.Randomness.Dog
|
||||||
{
|
{
|
||||||
public class Dog : TransactionModuleBase
|
public class Dog : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
using System.Text.Json.Serialization;
|
namespace Geekbot.Bot.Commands.Randomness.Dog
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness.Dog
|
|
||||||
{
|
{
|
||||||
internal class DogResponseDto
|
internal class DogResponseDto
|
||||||
{
|
{
|
||||||
[JsonPropertyName("url")]
|
|
||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,19 +1,18 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
using Geekbot.Core.GuildSettingsManager;
|
|
||||||
using Localization = Geekbot.Core.Localization;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness
|
namespace Geekbot.Bot.Commands.Randomness
|
||||||
{
|
{
|
||||||
public class EightBall : GeekbotCommandBase
|
public class EightBall : ModuleBase
|
||||||
{
|
{
|
||||||
public EightBall(IErrorHandler errorHandler, IGuildSettingsManager guildSettingsManager) : base(errorHandler, guildSettingsManager)
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
public EightBall(IErrorHandler errorHandler)
|
||||||
{
|
{
|
||||||
|
_errorHandler = errorHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("8ball", RunMode = RunMode.Async)]
|
[Command("8ball", RunMode = RunMode.Async)]
|
||||||
|
@ -22,19 +21,36 @@ namespace Geekbot.Bot.Commands.Randomness
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var enumerator = Localization.EightBall.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true).GetEnumerator();
|
var replies = new List<string>
|
||||||
var replies = new List<string>();
|
|
||||||
while (enumerator.MoveNext())
|
|
||||||
{
|
{
|
||||||
replies.Add(enumerator.Value?.ToString());
|
"It is certain",
|
||||||
}
|
"It is decidedly so",
|
||||||
|
"Without a doubt",
|
||||||
|
"Yes, definitely",
|
||||||
|
"You may rely on it",
|
||||||
|
"As I see it, yes",
|
||||||
|
"Most likely",
|
||||||
|
"Outlook good",
|
||||||
|
"Yes",
|
||||||
|
"Signs point to yes",
|
||||||
|
"Reply hazy try again",
|
||||||
|
"Ask again later",
|
||||||
|
"Better not tell you now",
|
||||||
|
"Cannot predict now",
|
||||||
|
"Concentrate and ask again",
|
||||||
|
"Don't count on it",
|
||||||
|
"My reply is no",
|
||||||
|
"My sources say no",
|
||||||
|
"Outlook not so good",
|
||||||
|
"Very doubtful"
|
||||||
|
};
|
||||||
|
|
||||||
var answer = new Random().Next(replies.Count);
|
var answer = new Random().Next(replies.Count);
|
||||||
await ReplyAsync(replies[answer]);
|
await ReplyAsync(replies[answer]);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
await ErrorHandler.HandleCommandException(e, Context);
|
await _errorHandler.HandleCommandException(e, Context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.Media;
|
using Geekbot.Core.Media;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness
|
namespace Geekbot.Bot.Commands.Randomness
|
||||||
{
|
{
|
||||||
public class Fortune : TransactionModuleBase
|
public class Fortune : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IFortunesProvider _fortunes;
|
private readonly IFortunesProvider _fortunes;
|
||||||
|
|
||||||
|
|
36
src/Bot/Commands/Randomness/Gdq.cs
Normal file
36
src/Bot/Commands/Randomness/Gdq.cs
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
using System;
|
||||||
|
using System.Net;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord.Commands;
|
||||||
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
|
namespace Geekbot.Bot.Commands.Randomness
|
||||||
|
{
|
||||||
|
public class Gdq : ModuleBase
|
||||||
|
{
|
||||||
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
public Gdq(IErrorHandler errorHandler)
|
||||||
|
{
|
||||||
|
_errorHandler = errorHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Command("gdq", RunMode = RunMode.Async)]
|
||||||
|
[Summary("Get a quote from the GDQ donation generator.")]
|
||||||
|
public async Task GetQuote()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var client = new WebClient();
|
||||||
|
var url = new Uri("http://taskinoz.com/gdq/api/");
|
||||||
|
var response = client.DownloadString(url);
|
||||||
|
|
||||||
|
await ReplyAsync(response);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
await _errorHandler.HandleCommandException(e, Context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
src/Bot/Commands/Randomness/Greetings/GreetingBaseDto.cs
Normal file
11
src/Bot/Commands/Randomness/Greetings/GreetingBaseDto.cs
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
namespace Geekbot.Bot.Commands.Randomness.Greetings
|
||||||
|
{
|
||||||
|
public class GreetingBaseDto
|
||||||
|
{
|
||||||
|
public string Language { get; set; }
|
||||||
|
public string LanguageNative { get; set; }
|
||||||
|
public string LanguageCode { get; set; }
|
||||||
|
public string Script { get; set; }
|
||||||
|
public GreetingDto Primary { get; set; }
|
||||||
|
}
|
||||||
|
}
|
10
src/Bot/Commands/Randomness/Greetings/GreetingDto.cs
Normal file
10
src/Bot/Commands/Randomness/Greetings/GreetingDto.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
namespace Geekbot.Bot.Commands.Randomness.Greetings
|
||||||
|
{
|
||||||
|
public class GreetingDto
|
||||||
|
{
|
||||||
|
public string Text { get; set; }
|
||||||
|
public string Dialect { get; set; }
|
||||||
|
public string Romanization { get; set; }
|
||||||
|
public string[] Use { get; set; }
|
||||||
|
}
|
||||||
|
}
|
51
src/Bot/Commands/Randomness/Greetings/Greetings.cs
Normal file
51
src/Bot/Commands/Randomness/Greetings/Greetings.cs
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord;
|
||||||
|
using Discord.Commands;
|
||||||
|
using Geekbot.Core;
|
||||||
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
using Geekbot.Core.Extensions;
|
||||||
|
|
||||||
|
namespace Geekbot.Bot.Commands.Randomness.Greetings
|
||||||
|
{
|
||||||
|
public class Greetings : ModuleBase
|
||||||
|
{
|
||||||
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
public Greetings(IErrorHandler errorHandler)
|
||||||
|
{
|
||||||
|
_errorHandler = errorHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Command("hello", RunMode = RunMode.Async)]
|
||||||
|
[Alias("greeting", "hi", "hallo")]
|
||||||
|
[Summary("Say hello to the bot and get a reply in a random language")]
|
||||||
|
public async Task GetGreeting()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var greeting = await HttpAbstractions.Get<GreetingBaseDto>(new Uri("https://api.greetings.dev/v1/greeting"));
|
||||||
|
|
||||||
|
var eb = new EmbedBuilder();
|
||||||
|
eb.Title = greeting.Primary.Text;
|
||||||
|
eb.AddInlineField("Language", greeting.Language);
|
||||||
|
|
||||||
|
if (greeting.Primary.Dialect != null)
|
||||||
|
{
|
||||||
|
eb.AddInlineField("Dialect", greeting.Primary.Dialect);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (greeting.Primary.Romanization != null)
|
||||||
|
{
|
||||||
|
eb.AddInlineField("Roman", greeting.Primary.Romanization);
|
||||||
|
}
|
||||||
|
|
||||||
|
await ReplyAsync(string.Empty, false, eb.Build());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
await _errorHandler.HandleCommandException(e, Context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,7 +6,7 @@ using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness.Kanye
|
namespace Geekbot.Bot.Commands.Randomness.Kanye
|
||||||
{
|
{
|
||||||
public class Kanye : TransactionModuleBase
|
public class Kanye : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness.Kanye
|
namespace Geekbot.Bot.Commands.Randomness.Kanye
|
||||||
{
|
{
|
||||||
public class KanyeResponseDto
|
public class KanyeResponseDto
|
||||||
{
|
{
|
||||||
[JsonPropertyName("quote")]
|
public string Id { get; set; }
|
||||||
public string Quote { get; set; }
|
public string Quote { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,12 +1,11 @@
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.Media;
|
using Geekbot.Core.Media;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness
|
namespace Geekbot.Bot.Commands.Randomness
|
||||||
{
|
{
|
||||||
public class RandomAnimals : TransactionModuleBase
|
public class RandomAnimals : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IMediaProvider _mediaProvider;
|
private readonly IMediaProvider _mediaProvider;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ using Geekbot.Core.ErrorHandling;
|
||||||
using Geekbot.Core.Extensions;
|
using Geekbot.Core.Extensions;
|
||||||
using Geekbot.Core.GuildSettingsManager;
|
using Geekbot.Core.GuildSettingsManager;
|
||||||
using Geekbot.Core.RandomNumberGenerator;
|
using Geekbot.Core.RandomNumberGenerator;
|
||||||
using Localization = Geekbot.Core.Localization;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness
|
namespace Geekbot.Bot.Commands.Randomness
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,6 @@ using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.Database;
|
using Geekbot.Core.Database;
|
||||||
using Geekbot.Core.Database.Models;
|
using Geekbot.Core.Database.Models;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
@ -12,7 +11,7 @@ using Geekbot.Core.Extensions;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Randomness
|
namespace Geekbot.Bot.Commands.Randomness
|
||||||
{
|
{
|
||||||
public class Slap : TransactionModuleBase
|
public class Slap : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
private readonly DatabaseContext _database;
|
private readonly DatabaseContext _database;
|
||||||
|
@ -77,14 +76,10 @@ namespace Geekbot.Bot.Commands.Randomness
|
||||||
"teapot",
|
"teapot",
|
||||||
"candle",
|
"candle",
|
||||||
"dictionary",
|
"dictionary",
|
||||||
"powerless banhammer",
|
"powerless banhammer"
|
||||||
"piece of low fat mozzarella",
|
|
||||||
// For some reason it never picks the last one
|
|
||||||
// Adding this workaround, because i'm to lazy to actually fix it at the time of writing this
|
|
||||||
"padding"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
await ReplyAsync($"{Context.User.Username} slapped {user.Username} with a {things[new Random().Next(0, things.Count - 1)]}");
|
await ReplyAsync($"{Context.User.Username} slapped {user.Username} with a {things[new Random().Next(things.Count - 1)]}");
|
||||||
|
|
||||||
await UpdateRecieved(user.Id);
|
await UpdateRecieved(user.Id);
|
||||||
await UpdateGiven(Context.User.Id);
|
await UpdateGiven(Context.User.Id);
|
||||||
|
@ -132,4 +127,4 @@ namespace Geekbot.Bot.Commands.Randomness
|
||||||
e.UserId.Equals(userId.AsLong()));
|
e.UserId.Equals(userId.AsLong()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3,15 +3,15 @@ using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Bot.CommandPreconditions;
|
using Geekbot.Bot.Utils;
|
||||||
using Geekbot.Core;
|
using Geekbot.Core;
|
||||||
|
using Geekbot.Core.CommandPreconditions;
|
||||||
using Geekbot.Core.Database;
|
using Geekbot.Core.Database;
|
||||||
using Geekbot.Core.Database.Models;
|
using Geekbot.Core.Database.Models;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
using Geekbot.Core.Extensions;
|
using Geekbot.Core.Extensions;
|
||||||
using Geekbot.Core.GuildSettingsManager;
|
using Geekbot.Core.GuildSettingsManager;
|
||||||
using Geekbot.Core.RandomNumberGenerator;
|
using Geekbot.Core.RandomNumberGenerator;
|
||||||
using Localization = Geekbot.Core.Localization;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Rpg
|
namespace Geekbot.Bot.Commands.Rpg
|
||||||
{
|
{
|
||||||
|
@ -37,16 +37,14 @@ namespace Geekbot.Bot.Commands.Rpg
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var actor = await GetUser(Context.User.Id);
|
var actor = await GetUser(Context.User.Id);
|
||||||
var timeoutDays = 1;
|
if (actor.LastPayout.Value.AddDays(1).Date > DateTime.Now.Date)
|
||||||
if (actor.LastPayout?.AddDays(timeoutDays) > DateTime.Now.ToUniversalTime())
|
|
||||||
{
|
{
|
||||||
var remaining = actor.LastPayout.Value.AddDays(timeoutDays) - DateTimeOffset.Now.ToUniversalTime();
|
var formattedWaitTime = DateLocalization.FormatDateTimeAsRemaining(DateTimeOffset.Now.AddDays(1).Date);
|
||||||
var formattedWaitTime = DateLocalization.FormatDateTimeAsRemaining(remaining);
|
|
||||||
await ReplyAsync(string.Format(Localization.Cookies.WaitForMoreCookies, formattedWaitTime));
|
await ReplyAsync(string.Format(Localization.Cookies.WaitForMoreCookies, formattedWaitTime));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
actor.Cookies += 10;
|
actor.Cookies += 10;
|
||||||
actor.LastPayout = DateTimeOffset.Now.ToUniversalTime();
|
actor.LastPayout = DateTimeOffset.Now;
|
||||||
await SetUser(actor);
|
await SetUser(actor);
|
||||||
await ReplyAsync(string.Format(Localization.Cookies.GetCookies, 10, actor.Cookies));
|
await ReplyAsync(string.Format(Localization.Cookies.GetCookies, 10, actor.Cookies));
|
||||||
|
|
||||||
|
@ -80,12 +78,6 @@ namespace Geekbot.Bot.Commands.Rpg
|
||||||
{
|
{
|
||||||
var giver = await GetUser(Context.User.Id);
|
var giver = await GetUser(Context.User.Id);
|
||||||
|
|
||||||
if (amount < 1)
|
|
||||||
{
|
|
||||||
await ReplyAsync(Localization.Cookies.CantTakeCookies);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (giver.Cookies < amount)
|
if (giver.Cookies < amount)
|
||||||
{
|
{
|
||||||
await ReplyAsync(Localization.Cookies.NotEnoughToGive);
|
await ReplyAsync(Localization.Cookies.NotEnoughToGive);
|
||||||
|
@ -154,7 +146,7 @@ namespace Geekbot.Bot.Commands.Rpg
|
||||||
GuildId = Context.Guild.Id.AsLong(),
|
GuildId = Context.Guild.Id.AsLong(),
|
||||||
UserId = userId.AsLong(),
|
UserId = userId.AsLong(),
|
||||||
Cookies = 0,
|
Cookies = 0,
|
||||||
LastPayout = DateTimeOffset.MinValue.ToUniversalTime()
|
LastPayout = DateTimeOffset.MinValue
|
||||||
};
|
};
|
||||||
var newUser = _database.Cookies.Add(user).Entity;
|
var newUser = _database.Cookies.Add(user).Entity;
|
||||||
await _database.SaveChangesAsync();
|
await _database.SaveChangesAsync();
|
||||||
|
|
|
@ -3,8 +3,7 @@ using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Bot.CommandPreconditions;
|
using Geekbot.Core.CommandPreconditions;
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.Database;
|
using Geekbot.Core.Database;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
using Geekbot.Core.Extensions;
|
using Geekbot.Core.Extensions;
|
||||||
|
@ -12,7 +11,7 @@ using Geekbot.Core.Levels;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.User
|
namespace Geekbot.Bot.Commands.User
|
||||||
{
|
{
|
||||||
public class GuildInfo : TransactionModuleBase
|
public class GuildInfo : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
private readonly DatabaseContext _database;
|
private readonly DatabaseContext _database;
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Bot.CommandPreconditions;
|
using Geekbot.Bot.Utils;
|
||||||
using Geekbot.Commands.Karma;
|
|
||||||
using Geekbot.Core;
|
using Geekbot.Core;
|
||||||
|
using Geekbot.Core.CommandPreconditions;
|
||||||
using Geekbot.Core.Database;
|
using Geekbot.Core.Database;
|
||||||
|
using Geekbot.Core.Database.Models;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
using Geekbot.Core.Extensions;
|
using Geekbot.Core.Extensions;
|
||||||
using Geekbot.Core.GuildSettingsManager;
|
using Geekbot.Core.GuildSettingsManager;
|
||||||
|
@ -25,52 +27,123 @@ namespace Geekbot.Bot.Commands.User
|
||||||
[Command("good", RunMode = RunMode.Async)]
|
[Command("good", RunMode = RunMode.Async)]
|
||||||
[Summary("Increase Someones Karma")]
|
[Summary("Increase Someones Karma")]
|
||||||
public async Task Good([Summary("@someone")] IUser user)
|
public async Task Good([Summary("@someone")] IUser user)
|
||||||
{
|
|
||||||
await ChangeKarma(user, KarmaChange.Up);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Command("bad", RunMode = RunMode.Async)]
|
|
||||||
[Summary("Decrease Someones Karma")]
|
|
||||||
public async Task Bad([Summary("@someone")] IUser user)
|
|
||||||
{
|
|
||||||
await ChangeKarma(user, KarmaChange.Down);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Command("neutral", RunMode = RunMode.Async)]
|
|
||||||
[Summary("Do nothing to someones Karma")]
|
|
||||||
public async Task Neutral([Summary("@someone")] IUser user)
|
|
||||||
{
|
|
||||||
await ChangeKarma(user, KarmaChange.Same);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task ChangeKarma(IUser user, KarmaChange change)
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var author = new Interactions.Resolved.User()
|
var actor = await GetUser(Context.User.Id);
|
||||||
|
if (user.Id == Context.User.Id)
|
||||||
{
|
{
|
||||||
Id = Context.User.Id.ToString(),
|
await ReplyAsync(string.Format(Localization.Karma.CannotChangeOwnUp, Context.User.Username));
|
||||||
Username = Context.User.Username,
|
}
|
||||||
Discriminator = Context.User.Discriminator,
|
else if (TimeoutFinished(actor.TimeOut))
|
||||||
Avatar = Context.User.AvatarId,
|
|
||||||
};
|
|
||||||
var targetUser = new Interactions.Resolved.User()
|
|
||||||
{
|
{
|
||||||
Id = user.Id.ToString(),
|
var formatedWaitTime = DateLocalization.FormatDateTimeAsRemaining(actor.TimeOut.AddMinutes(3));
|
||||||
Username = user.Username,
|
await ReplyAsync(string.Format(Localization.Karma.WaitUntill, Context.User.Username, formatedWaitTime));
|
||||||
Discriminator = user.Discriminator,
|
}
|
||||||
Avatar = user.AvatarId,
|
else
|
||||||
};
|
{
|
||||||
|
var target = await GetUser(user.Id);
|
||||||
var karma = new Geekbot.Commands.Karma.Karma(_database, Context.Guild.Id.AsLong());
|
target.Karma += 1;
|
||||||
var res = await karma.ChangeKarma(author, targetUser, change);
|
SetUser(target);
|
||||||
|
|
||||||
|
actor.TimeOut = DateTimeOffset.Now;
|
||||||
|
SetUser(actor);
|
||||||
|
|
||||||
await ReplyAsync(string.Empty, false, res.ToDiscordNetEmbed().Build());
|
await _database.SaveChangesAsync();
|
||||||
|
|
||||||
|
var eb = new EmbedBuilder();
|
||||||
|
eb.WithAuthor(new EmbedAuthorBuilder()
|
||||||
|
.WithIconUrl(user.GetAvatarUrl())
|
||||||
|
.WithName(user.Username));
|
||||||
|
|
||||||
|
eb.WithColor(new Color(138, 219, 146));
|
||||||
|
eb.Title = Localization.Karma.Increased;
|
||||||
|
eb.AddInlineField(Localization.Karma.By, Context.User.Username);
|
||||||
|
eb.AddInlineField(Localization.Karma.Amount, "+1");
|
||||||
|
eb.AddInlineField(Localization.Karma.Current, target.Karma);
|
||||||
|
await ReplyAsync("", false, eb.Build());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
await ErrorHandler.HandleCommandException(e, Context);
|
await ErrorHandler.HandleCommandException(e, Context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Command("bad", RunMode = RunMode.Async)]
|
||||||
|
[Summary("Decrease Someones Karma")]
|
||||||
|
public async Task Bad([Summary("@someone")] IUser user)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var actor = await GetUser(Context.User.Id);
|
||||||
|
if (user.Id == Context.User.Id)
|
||||||
|
{
|
||||||
|
await ReplyAsync(string.Format(Localization.Karma.CannotChangeOwnDown, Context.User.Username));
|
||||||
|
}
|
||||||
|
else if (TimeoutFinished(actor.TimeOut))
|
||||||
|
{
|
||||||
|
var formatedWaitTime = DateLocalization.FormatDateTimeAsRemaining(actor.TimeOut.AddMinutes(3));
|
||||||
|
await ReplyAsync(string.Format(Localization.Karma.WaitUntill, Context.User.Username, formatedWaitTime));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var target = await GetUser(user.Id);
|
||||||
|
target.Karma -= 1;
|
||||||
|
SetUser(target);
|
||||||
|
|
||||||
|
actor.TimeOut = DateTimeOffset.Now;
|
||||||
|
SetUser(actor);
|
||||||
|
|
||||||
|
await _database.SaveChangesAsync();
|
||||||
|
|
||||||
|
var eb = new EmbedBuilder();
|
||||||
|
eb.WithAuthor(new EmbedAuthorBuilder()
|
||||||
|
.WithIconUrl(user.GetAvatarUrl())
|
||||||
|
.WithName(user.Username));
|
||||||
|
|
||||||
|
eb.WithColor(new Color(138, 219, 146));
|
||||||
|
eb.Title = Localization.Karma.Decreased;
|
||||||
|
eb.AddInlineField(Localization.Karma.By, Context.User.Username);
|
||||||
|
eb.AddInlineField(Localization.Karma.Amount, "-1");
|
||||||
|
eb.AddInlineField(Localization.Karma.Current, target.Karma);
|
||||||
|
await ReplyAsync("", false, eb.Build());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
await ErrorHandler.HandleCommandException(e, Context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool TimeoutFinished(DateTimeOffset lastKarma)
|
||||||
|
{
|
||||||
|
return lastKarma.AddMinutes(3) > DateTimeOffset.Now;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<KarmaModel> GetUser(ulong userId)
|
||||||
|
{
|
||||||
|
var user = _database.Karma.FirstOrDefault(u =>u.GuildId.Equals(Context.Guild.Id.AsLong()) && u.UserId.Equals(userId.AsLong())) ?? await CreateNewRow(userId);
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetUser(KarmaModel user)
|
||||||
|
{
|
||||||
|
_database.Karma.Update(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<KarmaModel> CreateNewRow(ulong userId)
|
||||||
|
{
|
||||||
|
var user = new KarmaModel()
|
||||||
|
{
|
||||||
|
GuildId = Context.Guild.Id.AsLong(),
|
||||||
|
UserId = userId.AsLong(),
|
||||||
|
Karma = 0,
|
||||||
|
TimeOut = DateTimeOffset.MinValue
|
||||||
|
};
|
||||||
|
var newUser = _database.Karma.Add(user).Entity;
|
||||||
|
await _database.SaveChangesAsync();
|
||||||
|
return newUser;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,43 +0,0 @@
|
||||||
using Discord.Commands;
|
|
||||||
using Geekbot.Bot.CommandPreconditions;
|
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.Database;
|
|
||||||
using Geekbot.Core.ErrorHandling;
|
|
||||||
using Geekbot.Core.GuildSettingsManager;
|
|
||||||
using Geekbot.Core.Highscores;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.User
|
|
||||||
{
|
|
||||||
public class Rank : GeekbotCommandBase
|
|
||||||
{
|
|
||||||
private readonly IHighscoreManager _highscoreManager;
|
|
||||||
private readonly DatabaseContext _database;
|
|
||||||
|
|
||||||
public Rank(DatabaseContext database, IErrorHandler errorHandler, IHighscoreManager highscoreManager, IGuildSettingsManager guildSettingsManager)
|
|
||||||
: base(errorHandler, guildSettingsManager)
|
|
||||||
{
|
|
||||||
_database = database;
|
|
||||||
_highscoreManager = highscoreManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Command("rank", RunMode = RunMode.Async)]
|
|
||||||
[Summary("Get the highscore for various stats like message count, karma, correctly guessed roles, etc...")]
|
|
||||||
[DisableInDirectMessage]
|
|
||||||
public async Task RankCmd(
|
|
||||||
[Summary("type")] string typeUnformated = "messages",
|
|
||||||
[Summary("amount")] int amount = 10,
|
|
||||||
[Summary("season")] string season = null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var res = new Geekbot.Commands.Rank(_database, _highscoreManager)
|
|
||||||
.Run(typeUnformated, amount, season, Context.Guild.Id, Context.Guild.Name);
|
|
||||||
await ReplyAsync(res);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
await ErrorHandler.HandleCommandException(e, Context);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
111
src/Bot/Commands/User/Ranking/Rank.cs
Normal file
111
src/Bot/Commands/User/Ranking/Rank.cs
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord.Commands;
|
||||||
|
using Geekbot.Core;
|
||||||
|
using Geekbot.Core.CommandPreconditions;
|
||||||
|
using Geekbot.Core.Converters;
|
||||||
|
using Geekbot.Core.Database;
|
||||||
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
using Geekbot.Core.Extensions;
|
||||||
|
using Geekbot.Core.GuildSettingsManager;
|
||||||
|
using Geekbot.Core.Highscores;
|
||||||
|
|
||||||
|
namespace Geekbot.Bot.Commands.User.Ranking
|
||||||
|
{
|
||||||
|
public class Rank : GeekbotCommandBase
|
||||||
|
{
|
||||||
|
private readonly IEmojiConverter _emojiConverter;
|
||||||
|
private readonly IHighscoreManager _highscoreManager;
|
||||||
|
private readonly DatabaseContext _database;
|
||||||
|
|
||||||
|
public Rank(DatabaseContext database, IErrorHandler errorHandler, IEmojiConverter emojiConverter, IHighscoreManager highscoreManager, IGuildSettingsManager guildSettingsManager)
|
||||||
|
: base(errorHandler, guildSettingsManager)
|
||||||
|
{
|
||||||
|
_database = database;
|
||||||
|
_emojiConverter = emojiConverter;
|
||||||
|
_highscoreManager = highscoreManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Command("rank", RunMode = RunMode.Async)]
|
||||||
|
[Summary("get user top 10 in messages or karma")]
|
||||||
|
[DisableInDirectMessage]
|
||||||
|
public async Task RankCmd([Summary("type")] string typeUnformated = "messages", [Summary("amount")] int amount = 10)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
HighscoreTypes type;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
type = Enum.Parse<HighscoreTypes>(typeUnformated, true);
|
||||||
|
if (!Enum.IsDefined(typeof(HighscoreTypes), type)) throw new Exception();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
await ReplyAsync(Localization.Rank.InvalidType);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var replyBuilder = new StringBuilder();
|
||||||
|
if (amount > 20)
|
||||||
|
{
|
||||||
|
await ReplyAsync(Localization.Rank.LimitingTo20Warning);
|
||||||
|
amount = 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
var guildId = Context.Guild.Id;
|
||||||
|
Dictionary<HighscoreUserDto, int> highscoreUsers;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
highscoreUsers = _highscoreManager.GetHighscoresWithUserData(type, guildId, amount);
|
||||||
|
}
|
||||||
|
catch (HighscoreListEmptyException)
|
||||||
|
{
|
||||||
|
await ReplyAsync(string.Format(Localization.Rank.NoTypeFoundForServer, type));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var guildMessages = 0;
|
||||||
|
if (type == HighscoreTypes.messages)
|
||||||
|
{
|
||||||
|
guildMessages = _database.Messages
|
||||||
|
.Where(e => e.GuildId.Equals(Context.Guild.Id.AsLong()))
|
||||||
|
.Select(e => e.MessageCount)
|
||||||
|
.Sum();
|
||||||
|
}
|
||||||
|
|
||||||
|
var failedToRetrieveUser = highscoreUsers.Any(e => string.IsNullOrEmpty(e.Key.Username));
|
||||||
|
|
||||||
|
if (failedToRetrieveUser) replyBuilder.AppendLine(Localization.Rank.FailedToResolveAllUsernames).AppendLine();
|
||||||
|
|
||||||
|
replyBuilder.AppendLine(string.Format(Localization.Rank.HighscoresFor, type.ToString().CapitalizeFirst(), Context.Guild.Name));
|
||||||
|
|
||||||
|
var highscorePlace = 1;
|
||||||
|
foreach (var (user, value) in highscoreUsers)
|
||||||
|
{
|
||||||
|
replyBuilder.Append(highscorePlace < 11
|
||||||
|
? $"{_emojiConverter.NumberToEmoji(highscorePlace)} "
|
||||||
|
: $"`{highscorePlace}.` ");
|
||||||
|
|
||||||
|
replyBuilder.Append(user.Username != null
|
||||||
|
? $"**{user.Username}#{user.Discriminator}**"
|
||||||
|
: $"**{user.Id}**");
|
||||||
|
|
||||||
|
replyBuilder.Append(type == HighscoreTypes.messages
|
||||||
|
? $" - {value} {type} - {Math.Round((double) (100 * value) / guildMessages, 2)}%\n"
|
||||||
|
: $" - {value} {type}\n");
|
||||||
|
|
||||||
|
highscorePlace++;
|
||||||
|
}
|
||||||
|
|
||||||
|
await ReplyAsync(replyBuilder.ToString());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
await ErrorHandler.HandleCommandException(e, Context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,14 +3,13 @@ using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Bot.CommandPreconditions;
|
|
||||||
using Geekbot.Core;
|
using Geekbot.Core;
|
||||||
|
using Geekbot.Core.CommandPreconditions;
|
||||||
using Geekbot.Core.Database;
|
using Geekbot.Core.Database;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
using Geekbot.Core.Extensions;
|
using Geekbot.Core.Extensions;
|
||||||
using Geekbot.Core.GuildSettingsManager;
|
using Geekbot.Core.GuildSettingsManager;
|
||||||
using Geekbot.Core.Levels;
|
using Geekbot.Core.Levels;
|
||||||
using Localization = Geekbot.Core.Localization;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.User
|
namespace Geekbot.Bot.Commands.User
|
||||||
{
|
{
|
||||||
|
@ -55,8 +54,6 @@ namespace Geekbot.Bot.Commands.User
|
||||||
?.FirstOrDefault(e => e.GuildId.Equals(Context.Guild.Id.AsLong()) && e.UserId.Equals(userInfo.Id.AsLong()))
|
?.FirstOrDefault(e => e.GuildId.Equals(Context.Guild.Id.AsLong()) && e.UserId.Equals(userInfo.Id.AsLong()))
|
||||||
?.Cookies ?? 0;
|
?.Cookies ?? 0;
|
||||||
|
|
||||||
var quotes = _database.Quotes.Count(e => e.GuildId.Equals(Context.Guild.Id.AsLong()) && e.UserId.Equals(userInfo.Id.AsLong()));
|
|
||||||
|
|
||||||
var eb = new EmbedBuilder();
|
var eb = new EmbedBuilder();
|
||||||
eb.WithAuthor(new EmbedAuthorBuilder()
|
eb.WithAuthor(new EmbedAuthorBuilder()
|
||||||
.WithIconUrl(userInfo.GetAvatarUrl())
|
.WithIconUrl(userInfo.GetAvatarUrl())
|
||||||
|
@ -71,9 +68,9 @@ namespace Geekbot.Bot.Commands.User
|
||||||
e.UserId.Equals(userInfo.Id.AsLong()));
|
e.UserId.Equals(userInfo.Id.AsLong()));
|
||||||
|
|
||||||
eb.AddInlineField(Localization.Stats.OnDiscordSince,
|
eb.AddInlineField(Localization.Stats.OnDiscordSince,
|
||||||
$"{createdAt.Day}.{createdAt.Month}.{createdAt.Year} ({age} {Localization.Stats.Days})")
|
$"{createdAt.Day}.{createdAt.Month}.{createdAt.Year} ({age} days)")
|
||||||
.AddInlineField(Localization.Stats.JoinedServer,
|
.AddInlineField(Localization.Stats.JoinedServer,
|
||||||
$"{joinedAt.Day}.{joinedAt.Month}.{joinedAt.Year} ({joinedDayAgo} {Localization.Stats.Days})")
|
$"{joinedAt.Day}.{joinedAt.Month}.{joinedAt.Year} ({joinedDayAgo} days)")
|
||||||
.AddInlineField(Localization.Stats.Karma, karma?.Karma ?? 0)
|
.AddInlineField(Localization.Stats.Karma, karma?.Karma ?? 0)
|
||||||
.AddInlineField(Localization.Stats.Level, level)
|
.AddInlineField(Localization.Stats.Level, level)
|
||||||
.AddInlineField(Localization.Stats.MessagesSent, messages)
|
.AddInlineField(Localization.Stats.MessagesSent, messages)
|
||||||
|
@ -81,7 +78,6 @@ namespace Geekbot.Bot.Commands.User
|
||||||
|
|
||||||
if (correctRolls != null) eb.AddInlineField(Localization.Stats.GuessedRolls, correctRolls.Rolls);
|
if (correctRolls != null) eb.AddInlineField(Localization.Stats.GuessedRolls, correctRolls.Rolls);
|
||||||
if (cookies > 0) eb.AddInlineField(Localization.Stats.Cookies, cookies);
|
if (cookies > 0) eb.AddInlineField(Localization.Stats.Cookies, cookies);
|
||||||
if (quotes > 0) eb.AddInlineField(Localization.Stats.Quotes, quotes);
|
|
||||||
|
|
||||||
await ReplyAsync("", false, eb.Build());
|
await ReplyAsync("", false, eb.Build());
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,11 @@
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Utils
|
namespace Geekbot.Bot.Commands.Utils
|
||||||
{
|
{
|
||||||
public class AvatarGetter : TransactionModuleBase
|
public class AvatarGetter : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
@ -22,8 +21,8 @@ namespace Geekbot.Bot.Commands.Utils
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
user ??= Context.User;
|
if (user == null) user = Context.User;
|
||||||
var url = user.GetAvatarUrl(ImageFormat.Auto, 1024);
|
var url = user.GetAvatarUrl().Replace("128", "1024");
|
||||||
await ReplyAsync(url);
|
await ReplyAsync(url);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -11,7 +11,7 @@ using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Utils.Changelog
|
namespace Geekbot.Bot.Commands.Utils.Changelog
|
||||||
{
|
{
|
||||||
public class Changelog : TransactionModuleBase
|
public class Changelog : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly DiscordSocketClient _client;
|
private readonly DiscordSocketClient _client;
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
|
@ -1,17 +1,11 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Utils.Changelog
|
namespace Geekbot.Bot.Commands.Utils.Changelog
|
||||||
{
|
{
|
||||||
public class CommitAuthorDto
|
public class CommitAuthorDto
|
||||||
{
|
{
|
||||||
[JsonPropertyName("name")]
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("email")]
|
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("date")]
|
|
||||||
public DateTimeOffset Date { get; set; }
|
public DateTimeOffset Date { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,10 +1,7 @@
|
||||||
using System.Text.Json.Serialization;
|
namespace Geekbot.Bot.Commands.Utils.Changelog
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Utils.Changelog
|
|
||||||
{
|
{
|
||||||
public class CommitDto
|
public class CommitDto
|
||||||
{
|
{
|
||||||
[JsonPropertyName("commit")]
|
|
||||||
public CommitInfoDto Commit { get; set; }
|
public CommitInfoDto Commit { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,13 +1,8 @@
|
||||||
using System.Text.Json.Serialization;
|
namespace Geekbot.Bot.Commands.Utils.Changelog
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Utils.Changelog
|
|
||||||
{
|
{
|
||||||
public class CommitInfoDto
|
public class CommitInfoDto
|
||||||
{
|
{
|
||||||
[JsonPropertyName("author")]
|
|
||||||
public CommitAuthorDto Author { get; set; }
|
public CommitAuthorDto Author { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("message")]
|
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,8 +1,9 @@
|
||||||
using Discord.Commands;
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
using Geekbot.Core;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
using Geekbot.Core.GuildSettingsManager;
|
using Geekbot.Core.GuildSettingsManager;
|
||||||
using Localization = Geekbot.Core.Localization;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Utils
|
namespace Geekbot.Bot.Commands.Utils
|
||||||
{
|
{
|
||||||
|
@ -13,7 +14,7 @@ namespace Geekbot.Bot.Commands.Utils
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("choose", RunMode = RunMode.Async)]
|
[Command("choose", RunMode = RunMode.Async)]
|
||||||
[Summary("Let the bot choose for you, separate options with a semicolon.")]
|
[Summary("Let the bot choose for you, seperate options with a semicolon.")]
|
||||||
public async Task Command([Remainder] [Summary("option1;option2")]
|
public async Task Command([Remainder] [Summary("option1;option2")]
|
||||||
string choices)
|
string choices)
|
||||||
{
|
{
|
||||||
|
|
66
src/Bot/Commands/Utils/Corona/CoronaStats.cs
Normal file
66
src/Bot/Commands/Utils/Corona/CoronaStats.cs
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord;
|
||||||
|
using Discord.Commands;
|
||||||
|
using Geekbot.Core;
|
||||||
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
using Geekbot.Core.Extensions;
|
||||||
|
|
||||||
|
namespace Geekbot.Bot.Commands.Utils.Corona
|
||||||
|
{
|
||||||
|
public class CoronaStats : ModuleBase
|
||||||
|
{
|
||||||
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
public CoronaStats(IErrorHandler errorHandler)
|
||||||
|
{
|
||||||
|
_errorHandler = errorHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Command("corona", RunMode = RunMode.Async)]
|
||||||
|
[Summary("Get the latest worldwide corona statistics")]
|
||||||
|
public async Task Summary()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var summary = await HttpAbstractions.Get<CoronaSummaryDto>(new Uri("https://api.covid19api.com/world/total"));
|
||||||
|
var activeCases = summary.TotalConfirmed - (summary.TotalRecovered + summary.TotalDeaths);
|
||||||
|
|
||||||
|
string CalculatePercentage(decimal i) => (i / summary.TotalConfirmed).ToString("#0.##%");
|
||||||
|
var activePercent = CalculatePercentage(activeCases);
|
||||||
|
var recoveredPercentage = CalculatePercentage(summary.TotalRecovered);
|
||||||
|
var deathsPercentage = CalculatePercentage(summary.TotalDeaths);
|
||||||
|
|
||||||
|
var numberFormat = "#,#";
|
||||||
|
var totalFormatted = summary.TotalConfirmed.ToString(numberFormat);
|
||||||
|
var activeFormatted = activeCases.ToString(numberFormat);
|
||||||
|
var recoveredFormatted = summary.TotalRecovered.ToString(numberFormat);
|
||||||
|
var deathsFormatted = summary.TotalDeaths.ToString(numberFormat);
|
||||||
|
|
||||||
|
var eb = new EmbedBuilder
|
||||||
|
{
|
||||||
|
Author = new EmbedAuthorBuilder
|
||||||
|
{
|
||||||
|
Name = "Confirmed Corona Cases",
|
||||||
|
IconUrl = "https://www.redcross.org/content/dam/icons/disasters/virus/Virus-1000x1000-R-Pl.png"
|
||||||
|
},
|
||||||
|
Footer = new EmbedFooterBuilder
|
||||||
|
{
|
||||||
|
Text = "Source: covid19api.com",
|
||||||
|
},
|
||||||
|
Color = Color.Red
|
||||||
|
};
|
||||||
|
eb.AddField("Total", totalFormatted);
|
||||||
|
eb.AddInlineField("Active", $"{activeFormatted} ({activePercent})");
|
||||||
|
eb.AddInlineField("Recovered", $"{recoveredFormatted} ({recoveredPercentage})");
|
||||||
|
eb.AddInlineField("Deaths", $"{deathsFormatted} ({deathsPercentage})");
|
||||||
|
|
||||||
|
await Context.Channel.SendMessageAsync(String.Empty, false, eb.Build());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
await _errorHandler.HandleCommandException(e, Context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
9
src/Bot/Commands/Utils/Corona/CoronaSummaryDto.cs
Normal file
9
src/Bot/Commands/Utils/Corona/CoronaSummaryDto.cs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
namespace Geekbot.Bot.Commands.Utils.Corona
|
||||||
|
{
|
||||||
|
public class CoronaSummaryDto
|
||||||
|
{
|
||||||
|
public decimal TotalConfirmed { get; set; }
|
||||||
|
public decimal TotalDeaths { get; set; }
|
||||||
|
public decimal TotalRecovered { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,13 +3,12 @@ using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.DiceParser;
|
using Geekbot.Core.DiceParser;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Utils
|
namespace Geekbot.Bot.Commands.Utils
|
||||||
{
|
{
|
||||||
public class Dice : TransactionModuleBase
|
public class Dice : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
private readonly IDiceParser _diceParser;
|
private readonly IDiceParser _diceParser;
|
||||||
|
|
|
@ -1,17 +1,20 @@
|
||||||
using Discord.Commands;
|
using System;
|
||||||
using Geekbot.Core;
|
using System.Threading.Tasks;
|
||||||
|
using Discord.Commands;
|
||||||
using Geekbot.Core.Converters;
|
using Geekbot.Core.Converters;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Utils
|
namespace Geekbot.Bot.Commands.Utils
|
||||||
{
|
{
|
||||||
public class Emojify : TransactionModuleBase
|
public class Emojify : ModuleBase
|
||||||
{
|
{
|
||||||
|
private readonly IEmojiConverter _emojiConverter;
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
public Emojify(IErrorHandler errorHandler)
|
public Emojify(IErrorHandler errorHandler, IEmojiConverter emojiConverter)
|
||||||
{
|
{
|
||||||
_errorHandler = errorHandler;
|
_errorHandler = errorHandler;
|
||||||
|
_emojiConverter = emojiConverter;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("emojify", RunMode = RunMode.Async)]
|
[Command("emojify", RunMode = RunMode.Async)]
|
||||||
|
@ -20,7 +23,7 @@ namespace Geekbot.Bot.Commands.Utils
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var emojis = EmojiConverter.TextToEmoji(text);
|
var emojis = _emojiConverter.TextToEmoji(text);
|
||||||
if (emojis.Length > 1999)
|
if (emojis.Length > 1999)
|
||||||
{
|
{
|
||||||
await ReplyAsync("I can't take that much at once!");
|
await ReplyAsync("I can't take that much at once!");
|
||||||
|
|
|
@ -3,12 +3,11 @@ using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Utils
|
namespace Geekbot.Bot.Commands.Utils
|
||||||
{
|
{
|
||||||
public class Help : TransactionModuleBase
|
public class Help : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
@ -27,7 +26,7 @@ namespace Geekbot.Bot.Commands.Utils
|
||||||
|
|
||||||
sb.AppendLine("For a list of all commands, please visit the following page");
|
sb.AppendLine("For a list of all commands, please visit the following page");
|
||||||
sb.AppendLine("https://geekbot.pizzaandcoffee.rocks/commands");
|
sb.AppendLine("https://geekbot.pizzaandcoffee.rocks/commands");
|
||||||
var dm = await Context.User.CreateDMChannelAsync(RequestOptions.Default);
|
var dm = await Context.User.GetOrCreateDMChannelAsync();
|
||||||
await dm.SendMessageAsync(sb.ToString());
|
await dm.SendMessageAsync(sb.ToString());
|
||||||
await Context.Message.AddReactionAsync(new Emoji("✅"));
|
await Context.Message.AddReactionAsync(new Emoji("✅"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ using Geekbot.Core.Extensions;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Utils
|
namespace Geekbot.Bot.Commands.Utils
|
||||||
{
|
{
|
||||||
public class Info : TransactionModuleBase
|
public class Info : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly DiscordSocketClient _client;
|
private readonly DiscordSocketClient _client;
|
||||||
private readonly CommandService _commands;
|
private readonly CommandService _commands;
|
||||||
|
|
|
@ -2,12 +2,11 @@ using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Utils
|
namespace Geekbot.Bot.Commands.Utils
|
||||||
{
|
{
|
||||||
public class Lmgtfy : TransactionModuleBase
|
public class Lmgtfy : ModuleBase
|
||||||
{
|
{
|
||||||
private readonly IErrorHandler _errorHandler;
|
private readonly IErrorHandler _errorHandler;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Core;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Utils
|
namespace Geekbot.Bot.Commands.Utils
|
||||||
{
|
{
|
||||||
public class Ping : TransactionModuleBase
|
public class Ping : ModuleBase
|
||||||
{
|
{
|
||||||
[Command("👀", RunMode = RunMode.Async)]
|
[Command("👀", RunMode = RunMode.Async)]
|
||||||
[Summary("Look at the bot.")]
|
[Summary("Look at the bot.")]
|
||||||
|
|
|
@ -4,8 +4,8 @@ using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.Bot.CommandPreconditions;
|
|
||||||
using Geekbot.Core;
|
using Geekbot.Core;
|
||||||
|
using Geekbot.Core.CommandPreconditions;
|
||||||
using Geekbot.Core.Database;
|
using Geekbot.Core.Database;
|
||||||
using Geekbot.Core.Database.Models;
|
using Geekbot.Core.Database.Models;
|
||||||
using Geekbot.Core.ErrorHandling;
|
using Geekbot.Core.ErrorHandling;
|
||||||
|
@ -13,11 +13,6 @@ using Geekbot.Core.Extensions;
|
||||||
using Geekbot.Core.GuildSettingsManager;
|
using Geekbot.Core.GuildSettingsManager;
|
||||||
using Geekbot.Core.Polyfills;
|
using Geekbot.Core.Polyfills;
|
||||||
using Geekbot.Core.RandomNumberGenerator;
|
using Geekbot.Core.RandomNumberGenerator;
|
||||||
using Geekbot.Core.UserRepository;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Sentry;
|
|
||||||
using Constants = Geekbot.Core.Constants;
|
|
||||||
using Localization = Geekbot.Core.Localization;
|
|
||||||
|
|
||||||
namespace Geekbot.Bot.Commands.Utils.Quote
|
namespace Geekbot.Bot.Commands.Utils.Quote
|
||||||
{
|
{
|
||||||
|
@ -27,15 +22,13 @@ namespace Geekbot.Bot.Commands.Utils.Quote
|
||||||
{
|
{
|
||||||
private readonly DatabaseContext _database;
|
private readonly DatabaseContext _database;
|
||||||
private readonly IRandomNumberGenerator _randomNumberGenerator;
|
private readonly IRandomNumberGenerator _randomNumberGenerator;
|
||||||
private readonly IUserRepository _userRepository;
|
|
||||||
private readonly bool _isDev;
|
private readonly bool _isDev;
|
||||||
|
|
||||||
public Quote(IErrorHandler errorHandler, DatabaseContext database, IRandomNumberGenerator randomNumberGenerator, IGuildSettingsManager guildSettingsManager, IUserRepository userRepository)
|
public Quote(IErrorHandler errorHandler, DatabaseContext database, IRandomNumberGenerator randomNumberGenerator, IGuildSettingsManager guildSettingsManager)
|
||||||
: base(errorHandler, guildSettingsManager)
|
: base(errorHandler, guildSettingsManager)
|
||||||
{
|
{
|
||||||
_database = database;
|
_database = database;
|
||||||
_randomNumberGenerator = randomNumberGenerator;
|
_randomNumberGenerator = randomNumberGenerator;
|
||||||
_userRepository = userRepository;
|
|
||||||
// to remove restrictions when developing
|
// to remove restrictions when developing
|
||||||
_isDev = Constants.BotVersion() == "0.0.0-DEV";
|
_isDev = Constants.BotVersion() == "0.0.0-DEV";
|
||||||
}
|
}
|
||||||
|
@ -46,26 +39,23 @@ namespace Geekbot.Bot.Commands.Utils.Quote
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var getQuoteFromDbSpan = Transaction.StartChild("GetQuoteFromDB");
|
var totalQuotes = await _database.Quotes.CountAsync(e => e.GuildId.Equals(Context.Guild.Id.AsLong()));
|
||||||
var quote = _database.Quotes.FromSqlInterpolated($"select * from \"Quotes\" where \"GuildId\" = {Context.Guild.Id} order by random() limit 1");
|
|
||||||
getQuoteFromDbSpan.Finish();
|
if (totalQuotes == 0)
|
||||||
|
|
||||||
if (!quote.Any())
|
|
||||||
{
|
{
|
||||||
await ReplyAsync(Localization.Quote.NoQuotesFound);
|
await ReplyAsync(Localization.Quote.NoQuotesFound);
|
||||||
Transaction.Status = SpanStatus.NotFound;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var buildQuoteEmbedSpan = Transaction.StartChild("BuildQuoteEmbed");
|
var random = _randomNumberGenerator.Next(0, totalQuotes - 1);
|
||||||
|
var quote = _database.Quotes.Where(e => e.GuildId.Equals(Context.Guild.Id.AsLong())).Skip(random).Take(1);
|
||||||
|
|
||||||
var embed = QuoteBuilder(quote.FirstOrDefault());
|
var embed = QuoteBuilder(quote.FirstOrDefault());
|
||||||
buildQuoteEmbedSpan.Finish();
|
|
||||||
await ReplyAsync("", false, embed.Build());
|
await ReplyAsync("", false, embed.Build());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
await ErrorHandler.HandleCommandException(e, Context, "Whoops, seems like the quote was to edgy to return");
|
await ErrorHandler.HandleCommandException(e, Context, "Whoops, seems like the quote was to edgy to return");
|
||||||
Transaction.Status = SpanStatus.InternalError;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,6 +74,22 @@ namespace Geekbot.Bot.Commands.Utils.Quote
|
||||||
{
|
{
|
||||||
await QuoteFromMention(user, false);
|
await QuoteFromMention(user, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Command("add")]
|
||||||
|
[Alias("save")]
|
||||||
|
[Summary("Add a quote from a message id")]
|
||||||
|
public async Task AddQuote([Summary("message-ID")] ulong messageId)
|
||||||
|
{
|
||||||
|
await QuoteFromMessageId(messageId, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Command("make")]
|
||||||
|
[Alias("preview")]
|
||||||
|
[Summary("Preview a quote from a message id")]
|
||||||
|
public async Task ReturnSpecifiedQuote([Summary("message-ID")] ulong messageId)
|
||||||
|
{
|
||||||
|
await QuoteFromMessageId(messageId, false);
|
||||||
|
}
|
||||||
|
|
||||||
[Command("add")]
|
[Command("add")]
|
||||||
[Alias("save")]
|
[Alias("save")]
|
||||||
|
@ -154,8 +160,8 @@ namespace Geekbot.Bot.Commands.Utils.Quote
|
||||||
.Where(row => row.GuildId == Context.Guild.Id.AsLong())
|
.Where(row => row.GuildId == Context.Guild.Id.AsLong())
|
||||||
.GroupBy(row => row.UserId)
|
.GroupBy(row => row.UserId)
|
||||||
.Select(row => new { userId = row.Key, amount = row.Count()})
|
.Select(row => new { userId = row.Key, amount = row.Count()})
|
||||||
.OrderByDescending(row => row.amount)
|
.OrderBy(row => row.amount)
|
||||||
.First();
|
.Last();
|
||||||
var mostQuotedPersonUser = Context.Client.GetUserAsync(mostQuotedPerson.userId.AsUlong()).Result ?? new UserPolyfillDto {Username = "Unknown User"};
|
var mostQuotedPersonUser = Context.Client.GetUserAsync(mostQuotedPerson.userId.AsUlong()).Result ?? new UserPolyfillDto {Username = "Unknown User"};
|
||||||
|
|
||||||
var quotesByYear = _database.Quotes
|
var quotesByYear = _database.Quotes
|
||||||
|
@ -202,7 +208,21 @@ namespace Geekbot.Bot.Commands.Utils.Quote
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task QuoteFromMessageLink(string messageLink, bool saveToDb)
|
private async Task QuoteFromMessageId(ulong messageId, bool saveToDb)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var message = await Context.Channel.GetMessageAsync(messageId);
|
||||||
|
|
||||||
|
await ProcessQuote(message, saveToDb, true);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
await ErrorHandler.HandleCommandException(e, Context, "I couldn't find a message with that id :disappointed:");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task QuoteFromMessageLink(string messageLink, bool saveToDb)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -233,7 +253,7 @@ namespace Geekbot.Bot.Commands.Utils.Quote
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ProcessQuote(IMessage message, bool saveToDb)
|
private async Task ProcessQuote(IMessage message, bool saveToDb, bool showMessageIdWarning = false)
|
||||||
{
|
{
|
||||||
if (message.Author.Id == Context.Message.Author.Id && saveToDb && !_isDev)
|
if (message.Author.Id == Context.Message.Author.Id && saveToDb && !_isDev)
|
||||||
{
|
{
|
||||||
|
@ -258,38 +278,27 @@ namespace Geekbot.Bot.Commands.Utils.Quote
|
||||||
|
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
if (saveToDb) sb.AppendLine(Localization.Quote.QuoteAdded);
|
if (saveToDb) sb.AppendLine(Localization.Quote.QuoteAdded);
|
||||||
|
if (showMessageIdWarning) sb.AppendLine(Localization.Quote.MessageIdDeprecation);
|
||||||
|
|
||||||
await ReplyAsync(sb.ToString(), false, embed.Build());
|
await ReplyAsync(sb.ToString(), false, embed.Build());
|
||||||
}
|
}
|
||||||
|
|
||||||
private EmbedBuilder QuoteBuilder(QuoteModel quote)
|
private EmbedBuilder QuoteBuilder(QuoteModel quote)
|
||||||
{
|
{
|
||||||
var getEmbedUserSpan = Transaction.StartChild("GetEmbedUser");
|
var user = Context.Client.GetUserAsync(quote.UserId.AsUlong()).Result ?? new UserPolyfillDto { Username = "Unknown User" };
|
||||||
var user = Context.Client.GetUserAsync(quote.UserId.AsUlong()).Result;
|
|
||||||
if (user == null)
|
|
||||||
{
|
|
||||||
var getEmbedUserFromRepoSpan = Transaction.StartChild("GetEmbedUserFromRepo");
|
|
||||||
var fallbackUserFromRepo = _userRepository.Get(quote.UserId.AsUlong());
|
|
||||||
user = new UserPolyfillDto()
|
|
||||||
{
|
|
||||||
Username = fallbackUserFromRepo?.Username ?? "Unknown User",
|
|
||||||
AvatarUrl = fallbackUserFromRepo?.AvatarUrl
|
|
||||||
};
|
|
||||||
getEmbedUserFromRepoSpan.Finish();
|
|
||||||
}
|
|
||||||
getEmbedUserSpan.Finish();
|
|
||||||
|
|
||||||
var embedBuilderSpan = Transaction.StartChild("EmbedBuilder");
|
|
||||||
var eb = new EmbedBuilder();
|
var eb = new EmbedBuilder();
|
||||||
eb.WithColor(new Color(143, 167, 232));
|
eb.WithColor(new Color(143, 167, 232));
|
||||||
eb.Title = quote.InternalId == 0
|
if (quote.InternalId == 0)
|
||||||
? $"{user.Username} @ {quote.Time.Day}.{quote.Time.Month}.{quote.Time.Year}"
|
{
|
||||||
: $"#{quote.InternalId} | {user.Username} @ {quote.Time.Day}.{quote.Time.Month}.{quote.Time.Year}";
|
eb.Title = $"{user.Username} @ {quote.Time.Day}.{quote.Time.Month}.{quote.Time.Year}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
eb.Title = $"#{quote.InternalId} | {user.Username} @ {quote.Time.Day}.{quote.Time.Month}.{quote.Time.Year}";
|
||||||
|
}
|
||||||
eb.Description = quote.Quote;
|
eb.Description = quote.Quote;
|
||||||
eb.ThumbnailUrl = user.GetAvatarUrl();
|
eb.ThumbnailUrl = user.GetAvatarUrl();
|
||||||
if (quote.Image != null) eb.ImageUrl = quote.Image;
|
if (quote.Image != null) eb.ImageUrl = quote.Image;
|
||||||
embedBuilderSpan.Finish();
|
|
||||||
|
|
||||||
return eb;
|
return eb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,7 +322,7 @@ namespace Geekbot.Bot.Commands.Utils.Quote
|
||||||
InternalId = internalId,
|
InternalId = internalId,
|
||||||
GuildId = Context.Guild.Id.AsLong(),
|
GuildId = Context.Guild.Id.AsLong(),
|
||||||
UserId = message.Author.Id.AsLong(),
|
UserId = message.Author.Id.AsLong(),
|
||||||
Time = message.Timestamp.DateTime.ToUniversalTime(),
|
Time = message.Timestamp.DateTime,
|
||||||
Quote = message.Content,
|
Quote = message.Content,
|
||||||
Image = image
|
Image = image
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,10 +21,12 @@ namespace Geekbot.Bot.Handlers
|
||||||
private readonly RestApplication _applicationInfo;
|
private readonly RestApplication _applicationInfo;
|
||||||
private readonly IGuildSettingsManager _guildSettingsManager;
|
private readonly IGuildSettingsManager _guildSettingsManager;
|
||||||
private readonly List<ulong> _ignoredServers;
|
private readonly List<ulong> _ignoredServers;
|
||||||
|
private readonly DatabaseContext _database;
|
||||||
|
|
||||||
public CommandHandler(IDiscordClient client, IGeekbotLogger logger, IServiceProvider servicesProvider, CommandService commands, RestApplication applicationInfo,
|
public CommandHandler(DatabaseContext database, IDiscordClient client, IGeekbotLogger logger, IServiceProvider servicesProvider, CommandService commands, RestApplication applicationInfo,
|
||||||
IGuildSettingsManager guildSettingsManager)
|
IGuildSettingsManager guildSettingsManager)
|
||||||
{
|
{
|
||||||
|
_database = database;
|
||||||
_client = client;
|
_client = client;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_servicesProvider = servicesProvider;
|
_servicesProvider = servicesProvider;
|
||||||
|
@ -37,7 +39,7 @@ namespace Geekbot.Bot.Handlers
|
||||||
_ignoredServers = new List<ulong>
|
_ignoredServers = new List<ulong>
|
||||||
{
|
{
|
||||||
228623803201224704, // SwitzerLAN
|
228623803201224704, // SwitzerLAN
|
||||||
// 169844523181015040, // EEvent
|
169844523181015040, // EEvent
|
||||||
248531441548263425, // MYI
|
248531441548263425, // MYI
|
||||||
110373943822540800 // Discord Bots
|
110373943822540800 // Discord Bots
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,11 +23,11 @@ namespace Geekbot.Bot.Handlers
|
||||||
_client = client;
|
_client = client;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task HandleMessageDeleted(Cacheable<IMessage, ulong> message, Cacheable<IMessageChannel, ulong> cacheableMessageChannel)
|
public async Task HandleMessageDeleted(Cacheable<IMessage, ulong> message, ISocketMessageChannel channel)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var guildSocketData = ((IGuildChannel) cacheableMessageChannel.Value).Guild;
|
var guildSocketData = ((IGuildChannel) channel).Guild;
|
||||||
var guild = _database.GuildSettings.FirstOrDefault(g => g.GuildId.Equals(guildSocketData.Id.AsLong()));
|
var guild = _database.GuildSettings.FirstOrDefault(g => g.GuildId.Equals(guildSocketData.Id.AsLong()));
|
||||||
if ((guild?.ShowDelete ?? false) && guild?.ModChannel != 0)
|
if ((guild?.ShowDelete ?? false) && guild?.ModChannel != 0)
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@ namespace Geekbot.Bot.Handlers
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
if (message.Value != null)
|
if (message.Value != null)
|
||||||
{
|
{
|
||||||
sb.AppendLine($"The following message from {message.Value.Author.Username}#{message.Value.Author.Discriminator} was deleted in <#{cacheableMessageChannel.Id}>");
|
sb.AppendLine($"The following message from {message.Value.Author.Username}#{message.Value.Author.Discriminator} was deleted in <#{channel.Id}>");
|
||||||
sb.AppendLine(message.Value.Content);
|
sb.AppendLine(message.Value.Content);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -14,19 +14,19 @@ namespace Geekbot.Bot.Handlers
|
||||||
_reactionListener = reactionListener;
|
_reactionListener = reactionListener;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task Added(Cacheable<IUserMessage, ulong> cacheableUserMessage, Cacheable<IMessageChannel, ulong> cacheableMessageChannel, SocketReaction reaction)
|
public Task Added(Cacheable<IUserMessage, ulong> cacheable, ISocketMessageChannel socketMessageChannel, SocketReaction reaction)
|
||||||
{
|
{
|
||||||
if (reaction.User.Value.IsBot) return Task.CompletedTask;
|
if (reaction.User.Value.IsBot) return Task.CompletedTask;
|
||||||
if (!_reactionListener.IsListener(reaction.MessageId)) return Task.CompletedTask;
|
if (!_reactionListener.IsListener(reaction.MessageId)) return Task.CompletedTask;
|
||||||
_reactionListener.GiveRole(cacheableMessageChannel.Value, reaction);
|
_reactionListener.GiveRole(socketMessageChannel, reaction);
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task Removed(Cacheable<IUserMessage, ulong> cacheableUserMessage, Cacheable<IMessageChannel, ulong> cacheableMessageChannel, SocketReaction reaction)
|
public Task Removed(Cacheable<IUserMessage, ulong> cacheable, ISocketMessageChannel socketMessageChannel, SocketReaction reaction)
|
||||||
{
|
{
|
||||||
if (reaction.User.Value.IsBot) return Task.CompletedTask;
|
if (reaction.User.Value.IsBot) return Task.CompletedTask;
|
||||||
if (!_reactionListener.IsListener(reaction.MessageId)) return Task.CompletedTask;
|
if (!_reactionListener.IsListener(reaction.MessageId)) return Task.CompletedTask;
|
||||||
_reactionListener.RemoveRole(cacheableMessageChannel.Value, reaction);
|
_reactionListener.RemoveRole(socketMessageChannel, reaction);
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ using Discord.WebSocket;
|
||||||
using Geekbot.Core.Database;
|
using Geekbot.Core.Database;
|
||||||
using Geekbot.Core.Database.Models;
|
using Geekbot.Core.Database.Models;
|
||||||
using Geekbot.Core.Extensions;
|
using Geekbot.Core.Extensions;
|
||||||
using Geekbot.Core.Highscores;
|
|
||||||
using Geekbot.Core.Logger;
|
using Geekbot.Core.Logger;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
@ -14,26 +13,11 @@ namespace Geekbot.Bot.Handlers
|
||||||
{
|
{
|
||||||
private readonly IGeekbotLogger _logger;
|
private readonly IGeekbotLogger _logger;
|
||||||
private readonly DatabaseContext _database;
|
private readonly DatabaseContext _database;
|
||||||
private string _season;
|
|
||||||
|
|
||||||
public StatsHandler(IGeekbotLogger logger, DatabaseContext database)
|
public StatsHandler(IGeekbotLogger logger, DatabaseContext database)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_database = database;
|
_database = database;
|
||||||
_season = SeasonsUtils.GetCurrentSeason();
|
|
||||||
|
|
||||||
var timer = new System.Timers.Timer()
|
|
||||||
{
|
|
||||||
Enabled = true,
|
|
||||||
AutoReset = true,
|
|
||||||
Interval = TimeSpan.FromMinutes(5).TotalMilliseconds
|
|
||||||
};
|
|
||||||
timer.Elapsed += (sender, args) =>
|
|
||||||
{
|
|
||||||
var current = SeasonsUtils.GetCurrentSeason();
|
|
||||||
if (current == _season) return;
|
|
||||||
_season = SeasonsUtils.GetCurrentSeason();
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task UpdateStats(SocketMessage message)
|
public async Task UpdateStats(SocketMessage message)
|
||||||
|
@ -49,16 +33,22 @@ namespace Geekbot.Bot.Handlers
|
||||||
|
|
||||||
var channel = (SocketGuildChannel) message.Channel;
|
var channel = (SocketGuildChannel) message.Channel;
|
||||||
|
|
||||||
// ignore the discord bots server
|
var rowId = await _database.Database.ExecuteSqlRawAsync(
|
||||||
// ToDo: create a clean solution for this...
|
"UPDATE \"Messages\" SET \"MessageCount\" = \"MessageCount\" + 1 WHERE \"GuildId\" = {0} AND \"UserId\" = {1}",
|
||||||
if (channel.Guild.Id == 110373943822540800)
|
channel.Guild.Id.AsLong(),
|
||||||
|
message.Author.Id.AsLong()
|
||||||
|
);
|
||||||
|
|
||||||
|
if (rowId == 0)
|
||||||
{
|
{
|
||||||
return;
|
await _database.Messages.AddAsync(new MessagesModel
|
||||||
|
{
|
||||||
|
UserId = message.Author.Id.AsLong(),
|
||||||
|
GuildId = channel.Guild.Id.AsLong(),
|
||||||
|
MessageCount = 1
|
||||||
|
});
|
||||||
|
await _database.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
await UpdateTotalTable(message, channel);
|
|
||||||
await UpdateSeasonsTable(message, channel);
|
|
||||||
|
|
||||||
|
|
||||||
if (message.Author.IsBot) return;
|
if (message.Author.IsBot) return;
|
||||||
_logger.Information(LogSource.Message, message.Content, SimpleConextConverter.ConvertSocketMessage(message));
|
_logger.Information(LogSource.Message, message.Content, SimpleConextConverter.ConvertSocketMessage(message));
|
||||||
|
@ -68,47 +58,5 @@ namespace Geekbot.Bot.Handlers
|
||||||
_logger.Error(LogSource.Message, "Could not process message stats", e);
|
_logger.Error(LogSource.Message, "Could not process message stats", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task UpdateTotalTable(SocketMessage message, SocketGuildChannel channel)
|
|
||||||
{
|
|
||||||
var rowId = await _database.Database.ExecuteSqlRawAsync(
|
|
||||||
"UPDATE \"Messages\" SET \"MessageCount\" = \"MessageCount\" + 1 WHERE \"GuildId\" = {0} AND \"UserId\" = {1}",
|
|
||||||
channel.Guild.Id.AsLong(),
|
|
||||||
message.Author.Id.AsLong()
|
|
||||||
);
|
|
||||||
|
|
||||||
if (rowId == 0)
|
|
||||||
{
|
|
||||||
await _database.Messages.AddAsync(new MessagesModel
|
|
||||||
{
|
|
||||||
UserId = message.Author.Id.AsLong(),
|
|
||||||
GuildId = channel.Guild.Id.AsLong(),
|
|
||||||
MessageCount = 1
|
|
||||||
});
|
|
||||||
await _database.SaveChangesAsync();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task UpdateSeasonsTable(SocketMessage message, SocketGuildChannel channel)
|
|
||||||
{
|
|
||||||
var rowId = await _database.Database.ExecuteSqlRawAsync(
|
|
||||||
"UPDATE \"MessagesSeasons\" SET \"MessageCount\" = \"MessageCount\" + 1 WHERE \"GuildId\" = {0} AND \"UserId\" = {1} AND \"Season\" = {2}",
|
|
||||||
channel.Guild.Id.AsLong(),
|
|
||||||
message.Author.Id.AsLong(),
|
|
||||||
_season
|
|
||||||
);
|
|
||||||
|
|
||||||
if (rowId == 0)
|
|
||||||
{
|
|
||||||
await _database.MessagesSeasons.AddAsync(new MessageSeasonsModel()
|
|
||||||
{
|
|
||||||
UserId = message.Author.Id.AsLong(),
|
|
||||||
GuildId = channel.Guild.Id.AsLong(),
|
|
||||||
Season = _season,
|
|
||||||
MessageCount = 1
|
|
||||||
});
|
|
||||||
await _database.SaveChangesAsync();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -74,15 +74,15 @@ namespace Geekbot.Bot.Handlers
|
||||||
await _userRepository.Update(newUser);
|
await _userRepository.Update(newUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task Left(SocketGuild socketGuild, SocketUser socketUser)
|
public async Task Left(SocketGuildUser user)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var guild = _database.GuildSettings.FirstOrDefault(g => g.GuildId.Equals(socketGuild.Id.AsLong()));
|
var guild = _database.GuildSettings.FirstOrDefault(g => g.GuildId.Equals(user.Guild.Id.AsLong()));
|
||||||
if (guild?.ShowLeave ?? false)
|
if (guild?.ShowLeave ?? false)
|
||||||
{
|
{
|
||||||
var modChannelSocket = (ISocketMessageChannel) await _client.GetChannelAsync(guild.ModChannel.AsUlong());
|
var modChannelSocket = (ISocketMessageChannel) await _client.GetChannelAsync(guild.ModChannel.AsUlong());
|
||||||
await modChannelSocket.SendMessageAsync($"{socketUser.Username}#{socketUser.Discriminator} left the server");
|
await modChannelSocket.SendMessageAsync($"{user.Username}#{user.Discriminator} left the server");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -90,7 +90,7 @@ namespace Geekbot.Bot.Handlers
|
||||||
_logger.Error(LogSource.Geekbot, "Failed to send leave message", e);
|
_logger.Error(LogSource.Geekbot, "Failed to send leave message", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.Information(LogSource.Geekbot, $"{socketUser.Username} ({socketUser.Id}) joined {socketGuild.Name} ({socketGuild.Id})");
|
_logger.Information(LogSource.Geekbot, $"{user.Username} ({user.Id}) joined {user.Guild.Name} ({user.Guild.Id})");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -8,7 +8,10 @@
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Geekbot.Core.Localization {
|
namespace Geekbot.Bot.Localization {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -19,24 +22,24 @@ namespace Geekbot.Core.Localization {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Admin {
|
internal class Admin {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
public Admin() {
|
internal Admin() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Core.Localization.Admin", typeof(Admin).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Bot.Localization.Admin", typeof(Admin).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
|
@ -48,7 +51,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
get {
|
get {
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +63,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to I'm talking english.
|
/// Looks up a localized string similar to I'm talking english.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string GetLanguage {
|
internal static string GetLanguage {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("GetLanguage", resourceCulture);
|
return ResourceManager.GetString("GetLanguage", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -69,7 +72,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to I will reply in english from now on.
|
/// Looks up a localized string similar to I will reply in english from now on.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string NewLanguageSet {
|
internal static string NewLanguageSet {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("NewLanguageSet", resourceCulture);
|
return ResourceManager.GetString("NewLanguageSet", resourceCulture);
|
||||||
}
|
}
|
|
@ -8,7 +8,10 @@
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Geekbot.Core.Localization {
|
namespace Geekbot.Bot.Localization {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -19,24 +22,24 @@ namespace Geekbot.Core.Localization {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Choose {
|
internal class Choose {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
public Choose() {
|
internal Choose() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Core.Localization.Choose", typeof(Choose).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Bot.Localization.Choose", typeof(Choose).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
|
@ -48,7 +51,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
get {
|
get {
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +63,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to I Choose **{0}**.
|
/// Looks up a localized string similar to I Choose **{0}**.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Choice {
|
internal static string Choice {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Choice", resourceCulture);
|
return ResourceManager.GetString("Choice", resourceCulture);
|
||||||
}
|
}
|
|
@ -8,7 +8,10 @@
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Geekbot.Core.Localization {
|
namespace Geekbot.Bot.Localization {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -19,24 +22,24 @@ namespace Geekbot.Core.Localization {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Corona {
|
internal class Cookies {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
public Corona() {
|
internal Cookies() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Core.Localization.Corona", typeof(Corona).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Bot.Localization.Cookies", typeof(Cookies).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
|
@ -48,7 +51,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
get {
|
get {
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
|
@ -58,56 +61,65 @@ namespace Geekbot.Core.Localization {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Active.
|
/// Looks up a localized string similar to You ate {0} cookies, you've only got {1} cookies left.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Active {
|
internal static string AteCookies {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Active", resourceCulture);
|
return ResourceManager.GetString("AteCookies", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Confirmed Corona Cases.
|
/// Looks up a localized string similar to You got {0} cookies, there are now {1} cookies in you cookie jar.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ConfirmedCases {
|
internal static string GetCookies {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("ConfirmedCases", resourceCulture);
|
return ResourceManager.GetString("GetCookies", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Deaths.
|
/// Looks up a localized string similar to You gave {0} cookies to {1}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Deaths {
|
internal static string Given {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Deaths", resourceCulture);
|
return ResourceManager.GetString("Given", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Recovered.
|
/// Looks up a localized string similar to There are {0} cookies in you cookie jar.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Recovered {
|
internal static string InYourJar {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Recovered", resourceCulture);
|
return ResourceManager.GetString("InYourJar", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Source.
|
/// Looks up a localized string similar to Your cookie jar looks almost empty, you should probably not eat a cookie.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Source {
|
internal static string NotEnoughCookiesToEat {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Source", resourceCulture);
|
return ResourceManager.GetString("NotEnoughCookiesToEat", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Total.
|
/// Looks up a localized string similar to You don't have enough cookies.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Total {
|
internal static string NotEnoughToGive {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Total", resourceCulture);
|
return ResourceManager.GetString("NotEnoughToGive", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to You already got cookies today, you can have more cookies in {0}.
|
||||||
|
/// </summary>
|
||||||
|
internal static string WaitForMoreCookies {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("WaitForMoreCookies", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -32,7 +32,4 @@
|
||||||
<data name="AteCookies" xml:space="preserve">
|
<data name="AteCookies" xml:space="preserve">
|
||||||
<value>Du hesch {0} guetzli gesse und hesch jezt no {1} übrig</value>
|
<value>Du hesch {0} guetzli gesse und hesch jezt no {1} übrig</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="CantTakeCookies" xml:space="preserve">
|
|
||||||
<value>:police_officer: Du chasch nid guetzli vo anderne chlaue... </value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
|
@ -39,7 +39,4 @@
|
||||||
<data name="AteCookies" xml:space="preserve">
|
<data name="AteCookies" xml:space="preserve">
|
||||||
<value>You ate {0} cookies, you've only got {1} cookies left</value>
|
<value>You ate {0} cookies, you've only got {1} cookies left</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="CantTakeCookies" xml:space="preserve">
|
|
||||||
<value>You can't take someone else's cookies</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
|
@ -8,7 +8,10 @@
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Geekbot.Core.Localization {
|
namespace Geekbot.Bot.Localization {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -19,24 +22,24 @@ namespace Geekbot.Core.Localization {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Internal {
|
internal class Internal {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
public Internal() {
|
internal Internal() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Core.Localization.Internal", typeof(Internal).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Bot.Localization.Internal", typeof(Internal).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
|
@ -48,7 +51,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
get {
|
get {
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +63,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to and.
|
/// Looks up a localized string similar to and.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string And {
|
internal static string And {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("And", resourceCulture);
|
return ResourceManager.GetString("And", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -69,7 +72,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to day|days.
|
/// Looks up a localized string similar to day|days.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Days {
|
internal static string Days {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Days", resourceCulture);
|
return ResourceManager.GetString("Days", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -78,7 +81,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to hour|hours.
|
/// Looks up a localized string similar to hour|hours.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Hours {
|
internal static string Hours {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Hours", resourceCulture);
|
return ResourceManager.GetString("Hours", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +90,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Seems like i don't have enough permission to that :confused:.
|
/// Looks up a localized string similar to Seems like i don't have enough permission to that :confused:.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Http403 {
|
internal static string Http403 {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Http403", resourceCulture);
|
return ResourceManager.GetString("Http403", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +99,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to minute|minutes.
|
/// Looks up a localized string similar to minute|minutes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Minutes {
|
internal static string Minutes {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Minutes", resourceCulture);
|
return ResourceManager.GetString("Minutes", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -105,7 +108,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to second|seconds.
|
/// Looks up a localized string similar to second|seconds.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Seconds {
|
internal static string Seconds {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Seconds", resourceCulture);
|
return ResourceManager.GetString("Seconds", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -114,7 +117,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Something went wrong :confused:.
|
/// Looks up a localized string similar to Something went wrong :confused:.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string SomethingWentWrong {
|
internal static string SomethingWentWrong {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("SomethingWentWrong", resourceCulture);
|
return ResourceManager.GetString("SomethingWentWrong", resourceCulture);
|
||||||
}
|
}
|
|
@ -8,7 +8,10 @@
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Geekbot.Core.Localization {
|
namespace Geekbot.Bot.Localization {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -19,24 +22,24 @@ namespace Geekbot.Core.Localization {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Karma {
|
internal class Karma {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
public Karma() {
|
internal Karma() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Core.Localization.Karma", typeof(Karma).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Bot.Localization.Karma", typeof(Karma).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
|
@ -48,7 +51,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
get {
|
get {
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +63,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Amount.
|
/// Looks up a localized string similar to Amount.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Amount {
|
internal static string Amount {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Amount", resourceCulture);
|
return ResourceManager.GetString("Amount", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -69,7 +72,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to By.
|
/// Looks up a localized string similar to By.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string By {
|
internal static string By {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("By", resourceCulture);
|
return ResourceManager.GetString("By", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -78,25 +81,16 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Sorry {0}, but you can't lower your own karma.
|
/// Looks up a localized string similar to Sorry {0}, but you can't lower your own karma.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string CannotChangeOwnDown {
|
internal static string CannotChangeOwnDown {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("CannotChangeOwnDown", resourceCulture);
|
return ResourceManager.GetString("CannotChangeOwnDown", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Sorry {0}, but you can't give yourself neutral karma.
|
|
||||||
/// </summary>
|
|
||||||
public static string CannotChangeOwnSame {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("CannotChangeOwnSame", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Sorry {0}, but you can't give yourself karma.
|
/// Looks up a localized string similar to Sorry {0}, but you can't give yourself karma.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string CannotChangeOwnUp {
|
internal static string CannotChangeOwnUp {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("CannotChangeOwnUp", resourceCulture);
|
return ResourceManager.GetString("CannotChangeOwnUp", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -105,7 +99,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Current.
|
/// Looks up a localized string similar to Current.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Current {
|
internal static string Current {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Current", resourceCulture);
|
return ResourceManager.GetString("Current", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -114,7 +108,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Karma lowered.
|
/// Looks up a localized string similar to Karma lowered.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Decreased {
|
internal static string Decreased {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Decreased", resourceCulture);
|
return ResourceManager.GetString("Decreased", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -123,25 +117,16 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Gained Karma.
|
/// Looks up a localized string similar to Gained Karma.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Increased {
|
internal static string Increased {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Increased", resourceCulture);
|
return ResourceManager.GetString("Increased", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Neutral Karma.
|
|
||||||
/// </summary>
|
|
||||||
public static string Neutral {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("Neutral", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Sorry {0}, but you have to wait {1} before you can give karma again....
|
/// Looks up a localized string similar to Sorry {0}, but you have to wait {1} before you can give karma again....
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string WaitUntill {
|
internal static string WaitUntill {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("WaitUntill", resourceCulture);
|
return ResourceManager.GetString("WaitUntill", resourceCulture);
|
||||||
}
|
}
|
|
@ -35,10 +35,4 @@
|
||||||
<data name="Decreased" xml:space="preserve">
|
<data name="Decreased" xml:space="preserve">
|
||||||
<value>Karma gsenkt</value>
|
<value>Karma gsenkt</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Neutral" xml:space="preserve">
|
|
||||||
<value>Neutral Karma</value>
|
|
||||||
</data>
|
|
||||||
<data name="CannotChangeOwnSame" xml:space="preserve">
|
|
||||||
<value>Sorry {0}, aber du chasch dr selber kei neutrals karma geh</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
|
@ -42,10 +42,4 @@
|
||||||
<data name="Decreased" xml:space="preserve">
|
<data name="Decreased" xml:space="preserve">
|
||||||
<value>Karma lowered</value>
|
<value>Karma lowered</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Neutral" xml:space="preserve">
|
|
||||||
<value>Neutral Karma</value>
|
|
||||||
</data>
|
|
||||||
<data name="CannotChangeOwnSame" xml:space="preserve">
|
|
||||||
<value>Sorry {0}, but you can't give yourself neutral karma</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
|
@ -8,7 +8,10 @@
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Geekbot.Core.Localization {
|
namespace Geekbot.Bot.Localization {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -19,24 +22,24 @@ namespace Geekbot.Core.Localization {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Quote {
|
internal class Quote {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
public Quote() {
|
internal Quote() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Core.Localization.Quote", typeof(Quote).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Bot.Localization.Quote", typeof(Quote).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
|
@ -48,7 +51,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
get {
|
get {
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +63,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to You can't save quotes by a bot....
|
/// Looks up a localized string similar to You can't save quotes by a bot....
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string CannotQuoteBots {
|
internal static string CannotQuoteBots {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("CannotQuoteBots", resourceCulture);
|
return ResourceManager.GetString("CannotQuoteBots", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -69,16 +72,25 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to You can't save your own quotes....
|
/// Looks up a localized string similar to You can't save your own quotes....
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string CannotSaveOwnQuotes {
|
internal static string CannotSaveOwnQuotes {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("CannotSaveOwnQuotes", resourceCulture);
|
return ResourceManager.GetString("CannotSaveOwnQuotes", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to :warning: Creating quotes by message ID is deprecated in favour of message links and will be removed on 1 December 2020.
|
||||||
|
/// </summary>
|
||||||
|
internal static string MessageIdDeprecation {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MessageIdDeprecation", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Most quoted person.
|
/// Looks up a localized string similar to Most quoted person.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string MostQuotesPerson {
|
internal static string MostQuotesPerson {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("MostQuotesPerson", resourceCulture);
|
return ResourceManager.GetString("MostQuotesPerson", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +99,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to This server doesn't seem to have any quotes yet. You can add a quote with `!quote save @user` or `!quote save <messageId>`.
|
/// Looks up a localized string similar to This server doesn't seem to have any quotes yet. You can add a quote with `!quote save @user` or `!quote save <messageId>`.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string NoQuotesFound {
|
internal static string NoQuotesFound {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("NoQuotesFound", resourceCulture);
|
return ResourceManager.GetString("NoQuotesFound", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +108,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to That is not a valid message link.
|
/// Looks up a localized string similar to That is not a valid message link.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string NotAValidMessageLink {
|
internal static string NotAValidMessageLink {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("NotAValidMessageLink", resourceCulture);
|
return ResourceManager.GetString("NotAValidMessageLink", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -105,7 +117,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to I couldn't find a quote with that ID :disappointed:.
|
/// Looks up a localized string similar to I couldn't find a quote with that ID :disappointed:.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string NotFoundWithId {
|
internal static string NotFoundWithId {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("NotFoundWithId", resourceCulture);
|
return ResourceManager.GetString("NotFoundWithId", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -114,7 +126,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to You can only quote messages from the same server.
|
/// Looks up a localized string similar to You can only quote messages from the same server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string OnlyQuoteFromSameServer {
|
internal static string OnlyQuoteFromSameServer {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("OnlyQuoteFromSameServer", resourceCulture);
|
return ResourceManager.GetString("OnlyQuoteFromSameServer", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -123,7 +135,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to **Quote Added**.
|
/// Looks up a localized string similar to **Quote Added**.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string QuoteAdded {
|
internal static string QuoteAdded {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("QuoteAdded", resourceCulture);
|
return ResourceManager.GetString("QuoteAdded", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -132,7 +144,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Quote Stats.
|
/// Looks up a localized string similar to Quote Stats.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string QuoteStats {
|
internal static string QuoteStats {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("QuoteStats", resourceCulture);
|
return ResourceManager.GetString("QuoteStats", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -141,7 +153,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to **Removed #{0}**.
|
/// Looks up a localized string similar to **Removed #{0}**.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Removed {
|
internal static string Removed {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Removed", resourceCulture);
|
return ResourceManager.GetString("Removed", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -150,7 +162,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Total.
|
/// Looks up a localized string similar to Total.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string TotalQuotes {
|
internal static string TotalQuotes {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("TotalQuotes", resourceCulture);
|
return ResourceManager.GetString("TotalQuotes", resourceCulture);
|
||||||
}
|
}
|
|
@ -44,4 +44,7 @@
|
||||||
<data name="OnlyQuoteFromSameServer" xml:space="preserve">
|
<data name="OnlyQuoteFromSameServer" xml:space="preserve">
|
||||||
<value>Du chasch numme nachrichte vom gliche server quote</value>
|
<value>Du chasch numme nachrichte vom gliche server quote</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="MessageIdDeprecation" xml:space="preserve">
|
||||||
|
<value>:warning: Es mache vo quotes mit message-IDs isch zgunste vo message-links veraltet und wird am 1. dezember 2020 entfernt</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -51,4 +51,7 @@
|
||||||
<data name="OnlyQuoteFromSameServer" xml:space="preserve">
|
<data name="OnlyQuoteFromSameServer" xml:space="preserve">
|
||||||
<value>You can only quote messages from the same server</value>
|
<value>You can only quote messages from the same server</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="MessageIdDeprecation" xml:space="preserve">
|
||||||
|
<value>:warning: Creating quotes by message ID is deprecated in favour of message links and will be removed on 1 December 2020</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -8,7 +8,10 @@
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Geekbot.Core.Localization {
|
namespace Geekbot.Bot.Localization {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -19,24 +22,24 @@ namespace Geekbot.Core.Localization {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Rank {
|
internal class Rank {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
public Rank() {
|
internal Rank() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Core.Localization.Rank", typeof(Rank).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Bot.Localization.Rank", typeof(Rank).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
|
@ -48,7 +51,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
get {
|
get {
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +63,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to :warning: I couldn't find all usernames. Maybe they left the server?.
|
/// Looks up a localized string similar to :warning: I couldn't find all usernames. Maybe they left the server?.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string FailedToResolveAllUsernames {
|
internal static string FailedToResolveAllUsernames {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("FailedToResolveAllUsernames", resourceCulture);
|
return ResourceManager.GetString("FailedToResolveAllUsernames", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -69,16 +72,16 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to :bar_chart: **{0} Highscore for {1}**.
|
/// Looks up a localized string similar to :bar_chart: **{0} Highscore for {1}**.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string HighscoresFor {
|
internal static string HighscoresFor {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("HighscoresFor", resourceCulture);
|
return ResourceManager.GetString("HighscoresFor", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Valid types are '`messages`' '`karma`', '`rolls`', '`cookies`', '`seasons`' and '`quotes`'.
|
/// Looks up a localized string similar to Valid types are '`messages`' '`karma`', '`rolls`' and '`cookies`'.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string InvalidType {
|
internal static string InvalidType {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("InvalidType", resourceCulture);
|
return ResourceManager.GetString("InvalidType", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +90,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to :warning: Limiting to 20.
|
/// Looks up a localized string similar to :warning: Limiting to 20.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string LimitingTo20Warning {
|
internal static string LimitingTo20Warning {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("LimitingTo20Warning", resourceCulture);
|
return ResourceManager.GetString("LimitingTo20Warning", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +99,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to No {0} found on this server.
|
/// Looks up a localized string similar to No {0} found on this server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string NoTypeFoundForServer {
|
internal static string NoTypeFoundForServer {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("NoTypeFoundForServer", resourceCulture);
|
return ResourceManager.GetString("NoTypeFoundForServer", resourceCulture);
|
||||||
}
|
}
|
|
@ -24,6 +24,6 @@
|
||||||
<value>:bar_chart: **{0} Highscore für {1}**</value>
|
<value>:bar_chart: **{0} Highscore für {1}**</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="InvalidType" xml:space="preserve">
|
<data name="InvalidType" xml:space="preserve">
|
||||||
<value>Gültigi paramenter sind '`messages`' '`karma`', '`rolls`', '`cookies`', '`seasons`' und '`quotes`'</value>
|
<value>Gültigi paramenter sind '`messages`' '`karma`', '`rolls`' und '`cookies`</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -19,7 +19,7 @@
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="InvalidType" xml:space="preserve">
|
<data name="InvalidType" xml:space="preserve">
|
||||||
<value>Valid types are '`messages`' '`karma`', '`rolls`', '`cookies`', '`seasons`' and '`quotes`'</value>
|
<value>Valid types are '`messages`' '`karma`', '`rolls`' and '`cookies`'</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LimitingTo20Warning" xml:space="preserve">
|
<data name="LimitingTo20Warning" xml:space="preserve">
|
||||||
<value>:warning: Limiting to 20</value>
|
<value>:warning: Limiting to 20</value>
|
|
@ -8,7 +8,10 @@
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Geekbot.Core.Localization {
|
namespace Geekbot.Bot.Localization {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -19,24 +22,24 @@ namespace Geekbot.Core.Localization {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Role {
|
internal class Role {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
public Role() {
|
internal Role() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Core.Localization.Role", typeof(Role).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Bot.Localization.Role", typeof(Role).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
|
@ -48,7 +51,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
get {
|
get {
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +63,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Added {0} to the whitelist.
|
/// Looks up a localized string similar to Added {0} to the whitelist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string AddedRoleToWhitelist {
|
internal static string AddedRoleToWhitelist {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("AddedRoleToWhitelist", resourceCulture);
|
return ResourceManager.GetString("AddedRoleToWhitelist", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -69,7 +72,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Added you to {0}.
|
/// Looks up a localized string similar to Added you to {0}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string AddedUserFromRole {
|
internal static string AddedUserFromRole {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("AddedUserFromRole", resourceCulture);
|
return ResourceManager.GetString("AddedUserFromRole", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -78,7 +81,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to You cannot add that role to self service because it contains one or more dangerous permissions.
|
/// Looks up a localized string similar to You cannot add that role to self service because it contains one or more dangerous permissions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string CannotAddDangerousRole {
|
internal static string CannotAddDangerousRole {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("CannotAddDangerousRole", resourceCulture);
|
return ResourceManager.GetString("CannotAddDangerousRole", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +90,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to You can't add a role that is managed by discord.
|
/// Looks up a localized string similar to You can't add a role that is managed by discord.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string CannotAddManagedRole {
|
internal static string CannotAddManagedRole {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("CannotAddManagedRole", resourceCulture);
|
return ResourceManager.GetString("CannotAddManagedRole", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +99,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to **Self Service Roles on {0}**.
|
/// Looks up a localized string similar to **Self Service Roles on {0}**.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ListHeader {
|
internal static string ListHeader {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("ListHeader", resourceCulture);
|
return ResourceManager.GetString("ListHeader", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -105,7 +108,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to To get a role, use `!role [name]`.
|
/// Looks up a localized string similar to To get a role, use `!role [name]`.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ListInstruction {
|
internal static string ListInstruction {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("ListInstruction", resourceCulture);
|
return ResourceManager.GetString("ListInstruction", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -114,7 +117,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to There are no roles configured for this server.
|
/// Looks up a localized string similar to There are no roles configured for this server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string NoRolesConfigured {
|
internal static string NoRolesConfigured {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("NoRolesConfigured", resourceCulture);
|
return ResourceManager.GetString("NoRolesConfigured", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -123,7 +126,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Removed {0} from the whitelist.
|
/// Looks up a localized string similar to Removed {0} from the whitelist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string RemovedRoleFromWhitelist {
|
internal static string RemovedRoleFromWhitelist {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("RemovedRoleFromWhitelist", resourceCulture);
|
return ResourceManager.GetString("RemovedRoleFromWhitelist", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -132,7 +135,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Removed you from {0}.
|
/// Looks up a localized string similar to Removed you from {0}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string RemovedUserFromRole {
|
internal static string RemovedUserFromRole {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("RemovedUserFromRole", resourceCulture);
|
return ResourceManager.GetString("RemovedUserFromRole", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -141,7 +144,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to That role doesn't exist or is not on the whitelist.
|
/// Looks up a localized string similar to That role doesn't exist or is not on the whitelist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string RoleNotFound {
|
internal static string RoleNotFound {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("RoleNotFound", resourceCulture);
|
return ResourceManager.GetString("RoleNotFound", resourceCulture);
|
||||||
}
|
}
|
|
@ -8,7 +8,10 @@
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Geekbot.Core.Localization {
|
namespace Geekbot.Bot.Localization {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -19,24 +22,24 @@ namespace Geekbot.Core.Localization {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Roll {
|
internal class Roll {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
public Roll() {
|
internal Roll() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Core.Localization.Roll", typeof(Roll).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Bot.Localization.Roll", typeof(Roll).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
|
@ -48,7 +51,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
get {
|
get {
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +63,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Congratulations {0}, your guess was correct!.
|
/// Looks up a localized string similar to Congratulations {0}, your guess was correct!.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Gratz {
|
internal static string Gratz {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Gratz", resourceCulture);
|
return ResourceManager.GetString("Gratz", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -69,7 +72,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to :red_circle: {0}, you can't guess the same number again, guess another number or wait {1}.
|
/// Looks up a localized string similar to :red_circle: {0}, you can't guess the same number again, guess another number or wait {1}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string NoPrevGuess {
|
internal static string NoPrevGuess {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("NoPrevGuess", resourceCulture);
|
return ResourceManager.GetString("NoPrevGuess", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -78,7 +81,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to {0}, you rolled {1}, your guess was {2}.
|
/// Looks up a localized string similar to {0}, you rolled {1}, your guess was {2}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Rolled {
|
internal static string Rolled {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Rolled", resourceCulture);
|
return ResourceManager.GetString("Rolled", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +90,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to {0}, you rolled {1}.
|
/// Looks up a localized string similar to {0}, you rolled {1}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string RolledNoGuess {
|
internal static string RolledNoGuess {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("RolledNoGuess", resourceCulture);
|
return ResourceManager.GetString("RolledNoGuess", resourceCulture);
|
||||||
}
|
}
|
|
@ -8,7 +8,10 @@
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Geekbot.Core.Localization {
|
namespace Geekbot.Bot.Localization {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -19,24 +22,24 @@ namespace Geekbot.Core.Localization {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Ship {
|
internal class Ship {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
public Ship() {
|
internal Ship() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Core.Localization.Ship", typeof(Ship).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Bot.Localization.Ship", typeof(Ship).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
|
@ -48,7 +51,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
get {
|
get {
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +63,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Almost a match.
|
/// Looks up a localized string similar to Almost a match.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string CouldWork {
|
internal static string CouldWork {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("CouldWork", resourceCulture);
|
return ResourceManager.GetString("CouldWork", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -69,7 +72,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to It's a match.
|
/// Looks up a localized string similar to It's a match.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ItsAMatch {
|
internal static string ItsAMatch {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("ItsAMatch", resourceCulture);
|
return ResourceManager.GetString("ItsAMatch", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -78,7 +81,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Matchmaking.
|
/// Looks up a localized string similar to Matchmaking.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Matchmaking {
|
internal static string Matchmaking {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Matchmaking", resourceCulture);
|
return ResourceManager.GetString("Matchmaking", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +90,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Not going happen.
|
/// Looks up a localized string similar to Not going happen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string NotGoingToHappen {
|
internal static string NotGoingToHappen {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("NotGoingToHappen", resourceCulture);
|
return ResourceManager.GetString("NotGoingToHappen", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +99,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Not such a good idea.
|
/// Looks up a localized string similar to Not such a good idea.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string NotSuchAGoodIdea {
|
internal static string NotSuchAGoodIdea {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("NotSuchAGoodIdea", resourceCulture);
|
return ResourceManager.GetString("NotSuchAGoodIdea", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -105,7 +108,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to There might be a chance.
|
/// Looks up a localized string similar to There might be a chance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ThereMightBeAChance {
|
internal static string ThereMightBeAChance {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("ThereMightBeAChance", resourceCulture);
|
return ResourceManager.GetString("ThereMightBeAChance", resourceCulture);
|
||||||
}
|
}
|
|
@ -8,7 +8,10 @@
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace Geekbot.Core.Localization {
|
namespace Geekbot.Bot.Localization {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -19,24 +22,24 @@ namespace Geekbot.Core.Localization {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Stats {
|
internal class Stats {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
public Stats() {
|
internal Stats() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Core.Localization.Stats", typeof(Stats).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Geekbot.Bot.Localization.Stats", typeof(Stats).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
|
@ -48,7 +51,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
public static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
get {
|
get {
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
|
@ -60,25 +63,16 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Cookies.
|
/// Looks up a localized string similar to Cookies.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Cookies {
|
internal static string Cookies {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Cookies", resourceCulture);
|
return ResourceManager.GetString("Cookies", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Days.
|
|
||||||
/// </summary>
|
|
||||||
public static string Days {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("Days", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Guessed Rolls.
|
/// Looks up a localized string similar to Guessed Rolls.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string GuessedRolls {
|
internal static string GuessedRolls {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("GuessedRolls", resourceCulture);
|
return ResourceManager.GetString("GuessedRolls", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +81,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Joined Server.
|
/// Looks up a localized string similar to Joined Server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string JoinedServer {
|
internal static string JoinedServer {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("JoinedServer", resourceCulture);
|
return ResourceManager.GetString("JoinedServer", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +90,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Karma.
|
/// Looks up a localized string similar to Karma.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Karma {
|
internal static string Karma {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Karma", resourceCulture);
|
return ResourceManager.GetString("Karma", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -105,7 +99,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Level.
|
/// Looks up a localized string similar to Level.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Level {
|
internal static string Level {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Level", resourceCulture);
|
return ResourceManager.GetString("Level", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -114,7 +108,7 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Messages Sent.
|
/// Looks up a localized string similar to Messages Sent.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string MessagesSent {
|
internal static string MessagesSent {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("MessagesSent", resourceCulture);
|
return ResourceManager.GetString("MessagesSent", resourceCulture);
|
||||||
}
|
}
|
||||||
|
@ -123,25 +117,16 @@ namespace Geekbot.Core.Localization {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to On Discord Since.
|
/// Looks up a localized string similar to On Discord Since.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string OnDiscordSince {
|
internal static string OnDiscordSince {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("OnDiscordSince", resourceCulture);
|
return ResourceManager.GetString("OnDiscordSince", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Quotes.
|
|
||||||
/// </summary>
|
|
||||||
public static string Quotes {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("Quotes", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Server Total.
|
/// Looks up a localized string similar to Server Total.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ServerTotal {
|
internal static string ServerTotal {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("ServerTotal", resourceCulture);
|
return ResourceManager.GetString("ServerTotal", resourceCulture);
|
||||||
}
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue