Merge pull request #20 from smyalygames/main

feat(docs): add precondition for patreons only
This commit is contained in:
Anthony 2022-07-26 00:31:29 +01:00 committed by GitHub
commit d4fde7231e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -27,6 +27,7 @@ export class HugCommand extends Command {
...options, ...options,
name: 'hug', name: 'hug',
description: 'Hug a user', description: 'Hug a user',
preconditions: ['PatreonOnly'],
}); });
} }

View File

@ -39,7 +39,7 @@ export class PatreonOnlyPrecondition extends AllFlowsPrecondition {
} }
private async checkPatreon(user: GuildMember) { private async checkPatreon(user: GuildMember) {
return user.roles.cache.has(IDs.roles.patron) return user.roles.cache.has(IDs.roles.patron) || user.roles.cache.has(IDs.roles.patreon)
? this.ok() ? this.ok()
: this.error({ message: 'Only Patreon members can run this command!' }); : this.error({ message: 'Only Patreon members can run this command!' });
} }

View File

@ -46,6 +46,7 @@ const IDs = {
verifier: '871802735031373856', verifier: '871802735031373856',
}, },
patron: '765370219207852055', patron: '765370219207852055',
patreon: '993848684640997406',
}, },
channels: { channels: {
staff: { staff: {