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)
|
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
|
////todo owner only
|
||||||
//[LocalizedCommand, LocalizedDescription, LocalizedSummary]
|
//[LocalizedCommand, LocalizedDescription, LocalizedSummary]
|
||||||
|
@ -4,27 +4,12 @@ namespace NadekoBot.Services
|
|||||||
{
|
{
|
||||||
public class Localization : ILocalization
|
public class Localization : ILocalization
|
||||||
{
|
{
|
||||||
public string this[string key] {
|
public string this[string key] => LoadCommandString(key);
|
||||||
get {
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return Resources.ResponseStrings.ResourceManager.GetString(key);
|
|
||||||
}
|
|
||||||
catch (Exception) {
|
|
||||||
return key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string LoadCommandString(string key)
|
public static string LoadCommandString(string key)
|
||||||
{
|
{
|
||||||
try
|
string toReturn = Resources.CommandStrings.ResourceManager.GetString(key);
|
||||||
{
|
return string.IsNullOrWhiteSpace(toReturn) ? key : toReturn;
|
||||||
return Resources.CommandStrings.ResourceManager.GetString(key);
|
|
||||||
}
|
|
||||||
catch (Exception) {
|
|
||||||
return key;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//private static string GetCommandString(string key)
|
//private static string GetCommandString(string key)
|
||||||
|
Loading…
Reference in New Issue
Block a user