Fixed async method
CheckPermissions was not set to async so await would not work.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
public class RequireOwnerAttribute : PreconditionAttribute
|
||||
{
|
||||
// Override the CheckPermissions method
|
||||
public override Task<PreconditionResult> CheckPermissions(CommandContext context, CommandInfo command, IDependencyMap map)
|
||||
public async override Task<PreconditionResult> CheckPermissions(CommandContext context, CommandInfo command, IDependencyMap map)
|
||||
{
|
||||
// Get the ID of the bot's owner
|
||||
var ownerId = (await map.Get<DiscordSocketClient>().GetApplicationInfoAsync()).Owner.Id;
|
||||
|
||||
Reference in New Issue
Block a user