From cdb723bbeb343d7726576ffab322ddcf51a2a87d Mon Sep 17 00:00:00 2001 From: Evan Sours Date: Sat, 3 Dec 2016 18:25:31 -0700 Subject: [PATCH] Fixed async method CheckPermissions was not set to async so await would not work. --- docs/guides/samples/require_owner.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/samples/require_owner.cs b/docs/guides/samples/require_owner.cs index c8d3c2071..567b3d2af 100644 --- a/docs/guides/samples/require_owner.cs +++ b/docs/guides/samples/require_owner.cs @@ -4,7 +4,7 @@ public class RequireOwnerAttribute : PreconditionAttribute { // Override the CheckPermissions method - public override Task CheckPermissions(CommandContext context, CommandInfo command, IDependencyMap map) + public async override Task CheckPermissions(CommandContext context, CommandInfo command, IDependencyMap map) { // Get the ID of the bot's owner var ownerId = (await map.Get().GetApplicationInfoAsync()).Owner.Id; @@ -15,4 +15,4 @@ public class RequireOwnerAttribute : PreconditionAttribute else return PreconditionResult.FromError("You must be the owner of the bot to run this command."); } -} \ No newline at end of file +}