From 22f5e8ff46eb4122e49d5ec46bd5e908c92eb4ea Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Tue, 14 Mar 2017 20:10:37 +0100 Subject: [PATCH] Fixed the example precondition attribute --- docs/guides/samples/require_owner.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/guides/samples/require_owner.cs b/docs/guides/samples/require_owner.cs index 567b3d2af..137446553 100644 --- a/docs/guides/samples/require_owner.cs +++ b/docs/guides/samples/require_owner.cs @@ -1,10 +1,14 @@ // (Note: This precondition is obsolete, it is recommended to use the RequireOwnerAttribute that is bundled with Discord.Commands) +using Discord.Commands; +using Discord.WebSocket; +using System.Threading.Tasks; + // Inherit from PreconditionAttribute public class RequireOwnerAttribute : PreconditionAttribute { // Override the CheckPermissions method - public async override Task CheckPermissions(CommandContext context, CommandInfo command, IDependencyMap map) + public async override Task CheckPermissions(ICommandContext context, CommandInfo command, IDependencyMap map) { // Get the ID of the bot's owner var ownerId = (await map.Get().GetApplicationInfoAsync()).Owner.Id;