Browse Source

Fix CheckPermission in docs

pull/988/head
Hsu Still 7 years ago
parent
commit
ae6c064591
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      docs/guides/commands/samples/require_owner.cs

+ 1
- 1
docs/guides/commands/samples/require_owner.cs View File

@@ -10,7 +10,7 @@ using System.Threading.Tasks;
public class RequireOwnerAttribute : PreconditionAttribute
{
// 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
var ownerId = (await services.GetService<DiscordSocketClient>().GetApplicationInfoAsync()).Owner.Id;


Loading…
Cancel
Save