.langset and .langsetd can now be used with no arguments to show the currently set language

This commit is contained in:
Kwoth
2017-02-13 17:56:06 +01:00
parent 08c96385ea
commit 8ed7a4c5d8
4 changed files with 26 additions and 9 deletions

View File

@@ -28,6 +28,13 @@ namespace NadekoBot.Modules.Administration
[RequireUserPermission(GuildPermission.Administrator)]
public async Task LanguageSet([Remainder] string name = null)
{
if (string.IsNullOrWhiteSpace(name))
{
var cul = NadekoBot.Localization.GetCultureInfo(Context.Guild);
await Context.Channel.SendConfirmAsync("This server's language is set to " + cul + " - " + cul.NativeName).ConfigureAwait(false);
return;
}
CultureInfo ci = null;
try
{
@@ -53,8 +60,14 @@ namespace NadekoBot.Modules.Administration
[NadekoCommand, Usage, Description, Aliases]
[OwnerOnly]
public async Task LanguageSetDefault(string name)
public async Task LanguageSetDefault([Remainder]string name = null)
{
if (string.IsNullOrWhiteSpace(name))
{
var cul = NadekoBot.Localization.GetCultureInfo(Context.Guild);
await Context.Channel.SendConfirmAsync("Bot's language is set to " + cul + " - " + cul.NativeName).ConfigureAwait(false);
return;
}
CultureInfo ci = null;
try
{