From 4e09fc1de0489874e50bae74957d336f52391807 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Fri, 30 Mar 2018 18:33:05 +0200 Subject: [PATCH] Getting opinion doesn't need to be async --- .../CommandHandler/Commands/GeneralCommands.cs | 11 +++++------ DeukBot4/Utilities/BotOpinions.cs | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/DeukBot4/MessageHandlers/CommandHandler/Commands/GeneralCommands.cs b/DeukBot4/MessageHandlers/CommandHandler/Commands/GeneralCommands.cs index 5570dbe..4b7a29a 100644 --- a/DeukBot4/MessageHandlers/CommandHandler/Commands/GeneralCommands.cs +++ b/DeukBot4/MessageHandlers/CommandHandler/Commands/GeneralCommands.cs @@ -42,11 +42,10 @@ namespace DeukBot4.MessageHandlers.CommandHandler [Command("help", PermissionLevel.Everyone)] [CommandParameters(new []{ParameterMatcher.ParameterType.Word})] [CommandHelp("Displays a list of commands for the bot", -@"Allows you to see all commands you can use for your permission level, along with a description. -usage: -``help`` for a list of all commands useable for you. -``help`` [command name] for more detailed info on a specific command. Note that you need to be able to use the command to get this info." - )] + "Allows you to see all commands you can use for your permission level, along with a description.\n" + + "usage:\n``help`` for a list of all commands useable for you.\n" + + "``help`` [command name] for more detailed info on a specific command. " + + "Note that you need to be able to use the command to get this info.")] public async Task Help(CommandRequest request) { if (request.Parameters.Length == 0) @@ -66,7 +65,7 @@ usage: [CommandParameters(ParameterMatcher.ParameterType.Remainder)] public async Task BotOpinion(CommandRequest request) { - await request.SendMessageAsync(await BotOpinions.GetOpinion(request)); + await request.SendMessageAsync(BotOpinions.GetOpinion(request)); } } } \ No newline at end of file diff --git a/DeukBot4/Utilities/BotOpinions.cs b/DeukBot4/Utilities/BotOpinions.cs index bb19cf4..338210b 100644 --- a/DeukBot4/Utilities/BotOpinions.cs +++ b/DeukBot4/Utilities/BotOpinions.cs @@ -6,7 +6,7 @@ namespace DeukBot4.Utilities { public static class BotOpinions { - public static async Task GetOpinion(CommandRequest request) + public static string GetOpinion(CommandRequest request) { var extend = request.Parameters[0].AsString().ToLowerInvariant(); if (string.IsNullOrWhiteSpace(extend))