ignore commands from users on probation
This commit is contained in:
parent
ee51bf161c
commit
f7fb98f043
|
@ -208,6 +208,12 @@ client.on('message', async (message) => {
|
|||
if (args.shift()?.toLowerCase() != '/kibby') return;
|
||||
|
||||
const privileged = message.member?.hasPermission(message.channel?.server!, 'ManageMessages');
|
||||
|
||||
if (!privileged && db.data?.probation.includes(message.author_id)) {
|
||||
console.log('Ignoring user on probation');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!PUBLIC_COMMANDS.includes(args[0]?.toLowerCase()) && !privileged) {
|
||||
console.log('User has no permission');
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue