moved .commands and .modules to help, -h takes a command name optionaly. Fixes.

This commit is contained in:
Master Kwoth
2016-02-25 02:44:39 +01:00
parent c13eebb69d
commit b08e37f89d
8 changed files with 56 additions and 32 deletions

View File

@ -36,7 +36,7 @@ namespace NadekoBot.Classes.Music {
public float Volume => MusicControls?.Volume ?? 1.0f;
public bool RadioLink { get; private set; }
public bool RadioLink { get; }
public MusicControls MusicControls;

View File

@ -27,7 +27,7 @@ namespace NadekoBot.Classes.Permissions {
}
public bool CanRun(Command command, User user, Channel channel, out string error) {
error = null;
error = String.Empty;
if (timeBlackList.ContainsKey(user))
return false;
@ -86,11 +86,11 @@ namespace NadekoBot.Classes.Permissions {
return true;
}
if (PermissionsHandler._permissionsDict[user.Server].Verbose) //if verbose - print errors
Task.Run(() => channel.SendMessage(msg));
error = msg;
return false;
} catch (Exception ex) {
if (PermissionsHandler._permissionsDict[user.Server].Verbose) //if verbose - print errors
Task.Run(() => channel.SendMessage(ex.Message));
error = ex.Message;
return false;
}
}

View File

@ -81,15 +81,14 @@ namespace NadekoBot.Classes.Trivia {
private async Task End() {
ShouldStopGame = true;
await _channel.SendMessage("**Trivia game ended**");
await _channel.SendMessage(GetLeaderboard());
await _channel.SendMessage("**Trivia game ended**\n"+GetLeaderboard());
TriviaGame throwAwayValue;
Commands.Trivia.runningTrivias.TryRemove(_server, out throwAwayValue);
}
public void StopGame() {
public async void StopGame() {
if (!ShouldStopGame)
_channel.SendMessage(":exclamation: Trivia will stop after this question.");
await _channel.SendMessage(":exclamation: Trivia will stop after this question.");
ShouldStopGame = true;
}