mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-11-07 03:29:49 +01:00
Merge pull request #20 from smyalygames/main
feat(docs): add precondition for patreons only
This commit is contained in:
commit
d4fde7231e
@ -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'],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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!' });
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,6 +46,7 @@ const IDs = {
|
|||||||
verifier: '871802735031373856',
|
verifier: '871802735031373856',
|
||||||
},
|
},
|
||||||
patron: '765370219207852055',
|
patron: '765370219207852055',
|
||||||
|
patreon: '993848684640997406',
|
||||||
},
|
},
|
||||||
channels: {
|
channels: {
|
||||||
staff: {
|
staff: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user