Getting opinion doesn't need to be async
This commit is contained in:
parent
4407214a8e
commit
4e09fc1de0
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,7 +6,7 @@ namespace DeukBot4.Utilities
|
|||
{
|
||||
public static class BotOpinions
|
||||
{
|
||||
public static async Task<string> GetOpinion(CommandRequest request)
|
||||
public static string GetOpinion(CommandRequest request)
|
||||
{
|
||||
var extend = request.Parameters[0].AsString().ToLowerInvariant();
|
||||
if (string.IsNullOrWhiteSpace(extend))
|
||||
|
|
Loading…
Reference in New Issue