help in DMs, fixed commandlist not showing when you pm nadeko

This commit is contained in:
Master Kwoth 2016-03-14 02:10:12 +01:00
parent e6072f2a21
commit 0f5287835c
3 changed files with 9 additions and 7 deletions

View File

@ -38,7 +38,7 @@ namespace NadekoBot.Classes.Permissions {
return false;
if (channel.IsPrivate)
return false;
return command.Category == "Help";
timeBlackList.TryAdd(user, DateTime.Now);

View File

@ -49,7 +49,11 @@ namespace NadekoBot.Commands {
});
};
public static string HelpString => "**LIST OF COMMANDS CAN BE FOUND ON THIS LINK**\n\n <https://github.com/Kwoth/NadekoBot/blob/master/commandlist.md>";
public static string HelpString => $"You can use `{NadekoBot.Config.CommandPrefixes.Help}modules` command to see a list of all modules.\n" +
$"You can use `{NadekoBot.Config.CommandPrefixes.Help}commands ModuleName`" +
$" (for example `{NadekoBot.Config.CommandPrefixes.Help}commands Administration`) to see a list of all of the commands in that module.\n" +
$"For a specific command help, use `{NadekoBot.Config.CommandPrefixes.Help}h \"Command name\"` (for example `-h \"!m q\"`)" +
"**LIST OF COMMANDS CAN BE FOUND ON THIS LINK**\n\n <https://github.com/Kwoth/NadekoBot/blob/master/commandlist.md>";
public Action<CommandEventArgs> DoGitFunc() => e => {
string helpstr =
@ -121,6 +125,6 @@ You can join nadekobot server by simply private messaging NadekoBot, and you wil
return str;
}
public HelpCommand(DiscordModule module) : base(module) {}
public HelpCommand(DiscordModule module) : base(module) { }
}
}

View File

@ -198,10 +198,8 @@ namespace NadekoBot {
repliedRecently = true;
await e.Channel.SendMessage(HelpCommand.HelpString);
await Task.Run(async () => {
await Task.Delay(2000);
repliedRecently = true;
});
await Task.Delay(2000);
repliedRecently = false;
} catch { }
}
}