Small fix/debug

This commit is contained in:
Kwoth 2016-08-21 03:44:09 +02:00
parent 57a2caef84
commit 8271bf41d6
2 changed files with 3 additions and 25 deletions

View File

@ -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]

View File

@ -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)