Small fix/debug
This commit is contained in:
parent
57a2caef84
commit
8271bf41d6
@ -22,13 +22,6 @@ namespace NadekoBot.Modules.Administration
|
||||
public Administration(ILocalization loc, CommandService cmds, IBotConfiguration config, DiscordSocketClient client) : base(loc, cmds, config, client)
|
||||
{
|
||||
|
||||
}
|
||||
[LocalizedCommand, LocalizedDescription, LocalizedSummary]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task cmd(IMessage imsg, [Remainder] string arg)
|
||||
{
|
||||
var channel = imsg.Channel as ITextChannel;
|
||||
|
||||
}
|
||||
////todo owner only
|
||||
//[LocalizedCommand, LocalizedDescription, LocalizedSummary]
|
||||
|
@ -4,27 +4,12 @@ namespace NadekoBot.Services
|
||||
{
|
||||
public class Localization : ILocalization
|
||||
{
|
||||
public string this[string key] {
|
||||
get {
|
||||
try
|
||||
{
|
||||
return Resources.ResponseStrings.ResourceManager.GetString(key);
|
||||
}
|
||||
catch (Exception) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
}
|
||||
public string this[string key] => LoadCommandString(key);
|
||||
|
||||
public static string LoadCommandString(string key)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Resources.CommandStrings.ResourceManager.GetString(key);
|
||||
}
|
||||
catch (Exception) {
|
||||
return key;
|
||||
}
|
||||
string toReturn = Resources.CommandStrings.ResourceManager.GetString(key);
|
||||
return string.IsNullOrWhiteSpace(toReturn) ? key : toReturn;
|
||||
}
|
||||
|
||||
//private static string GetCommandString(string key)
|
||||
|
Loading…
Reference in New Issue
Block a user