mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-03 12:39:54 +03:00
List supported languages if an invalid one is provided (#9)
Co-authored-by: l1ttleO <l1ttleofficial@outlook.com>
This commit is contained in:
parent
fc00558dce
commit
938f918445
8 changed files with 934 additions and 736 deletions
|
@ -111,7 +111,11 @@ public sealed class SettingsCommand : ICommand {
|
|||
}
|
||||
|
||||
if (selectedSetting is "Lang" && !Utils.CultureInfoCache.ContainsKey(value)) {
|
||||
cmd.Reply(Messages.LanguageNotSupported, ReplyEmojis.Error);
|
||||
var langNotSupported = Boyfriend.StringBuilder.Append($"{Messages.LanguageNotSupported} ");
|
||||
foreach (var lang in Utils.CultureInfoCache) langNotSupported.Append($"`{lang.Key}`, ");
|
||||
langNotSupported.Remove(langNotSupported.Length - 2, 2);
|
||||
cmd.Reply(langNotSupported.ToString(), ReplyEmojis.Error);
|
||||
langNotSupported.Clear();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue