Make Translations easier to get
This commit is contained in:
parent
7584b09d35
commit
f0ba7bb9fc
4 changed files with 78 additions and 26 deletions
|
@ -5,7 +5,6 @@ using Discord;
|
|||
using Discord.Commands;
|
||||
using Discord.WebSocket;
|
||||
using Geekbot.net.Lib;
|
||||
using Serilog;
|
||||
using StackExchange.Redis;
|
||||
|
||||
namespace Geekbot.net.Commands
|
||||
|
@ -121,7 +120,8 @@ namespace Geekbot.net.Commands
|
|||
var success = _translation.SetLanguage(Context.Guild.Id, language);
|
||||
if (success)
|
||||
{
|
||||
await ReplyAsync(_translation.GetString(Context.Guild.Id, "LanguageChanger", "Confirm"));
|
||||
var trans = _translation.GetDict(Context);
|
||||
await ReplyAsync(trans["Confirm"]);
|
||||
return;
|
||||
}
|
||||
await ReplyAsync(
|
||||
|
@ -132,5 +132,21 @@ namespace Geekbot.net.Commands
|
|||
_errorHandler.HandleCommandException(e, Context);
|
||||
}
|
||||
}
|
||||
|
||||
[Command("lang", RunMode = RunMode.Async)]
|
||||
[Remarks(CommandCategories.Admin)]
|
||||
[Summary("Change the bots language")]
|
||||
public async Task getLanguage()
|
||||
{
|
||||
try
|
||||
{
|
||||
var trans = _translation.GetDict(Context);
|
||||
await ReplyAsync(trans["GetLanguage"]);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_errorHandler.HandleCommandException(e, Context);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue