ah yes
This commit is contained in:
parent
4c3d7a32f2
commit
66e02f9bbe
7
index.js
7
index.js
|
@ -37,19 +37,23 @@ client.on('message', message => {
|
|||
?.substr(prefix.length) :
|
||||
null;
|
||||
|
||||
let privileged = true;
|
||||
if (
|
||||
command && (
|
||||
process.env.OWNERID ?
|
||||
message.author.id != process.env.OWNERID :
|
||||
!message.member.permissions.has('MANAGE_GUILD')
|
||||
)
|
||||
) return message.react(process.env.EMOJI_ID).catch(console.warn); // fuck people with no rights
|
||||
) {
|
||||
privileged = false;
|
||||
}
|
||||
|
||||
switch(command) {
|
||||
case 'disable':
|
||||
case 'off':
|
||||
case 'die':
|
||||
case 'unalive':
|
||||
if (!privileged) return message.react(process.env.EMOJI_ID).catch(console.warn);
|
||||
enabled.set(message.guild.id, false);
|
||||
message.channel.send(`**Disabled** the uber fruitening`);
|
||||
break;
|
||||
|
@ -57,6 +61,7 @@ client.on('message', message => {
|
|||
case 'on':
|
||||
case 'alive':
|
||||
case 'undie':
|
||||
if (!privileged) return message.react(process.env.EMOJI_ID).catch(console.warn);
|
||||
enabled.set(message.guild.id, true);
|
||||
message.channel.send(`**Enabled** the uber fruitening`);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue