|
@@ -10,7 +10,7 @@ using System.Threading.Tasks; |
|
|
public class RequireOwnerAttribute : PreconditionAttribute |
|
|
public class RequireOwnerAttribute : PreconditionAttribute |
|
|
{ |
|
|
{ |
|
|
// Override the CheckPermissions method |
|
|
// Override the CheckPermissions method |
|
|
public async override Task<PreconditionResult> CheckPermissions(ICommandContext context, CommandInfo command, IServiceProvider services) |
|
|
|
|
|
|
|
|
public async override Task<PreconditionResult> CheckPermissionsAsync(ICommandContext context, CommandInfo command, IServiceProvider services) |
|
|
{ |
|
|
{ |
|
|
// Get the ID of the bot's owner |
|
|
// Get the ID of the bot's owner |
|
|
var ownerId = (await services.GetService<DiscordSocketClient>().GetApplicationInfoAsync()).Owner.Id; |
|
|
var ownerId = (await services.GetService<DiscordSocketClient>().GetApplicationInfoAsync()).Owner.Id; |
|
|