add "userError" function
This commit is contained in:
parent
869fb3468b
commit
c7c0145fca
1 changed files with 14 additions and 1 deletions
|
@ -1,8 +1,22 @@
|
||||||
|
const { MessageEmbed } = require('discord.js')
|
||||||
|
|
||||||
class Functions {
|
class Functions {
|
||||||
constructor (client) {
|
constructor (client) {
|
||||||
this.client = client;
|
this.client = client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
userError (channel, cmd, error) {
|
||||||
|
const embed = new MessageEmbed()
|
||||||
|
embed.setColor('#EF5350')
|
||||||
|
embed.setTitle(cmd.help.name + ':' + cmd.help.category.toLowerCase())
|
||||||
|
embed.setDescription(error)
|
||||||
|
embed.addField('**Usage**', cmd.help.usage)
|
||||||
|
embed.setFooter(`Run 'help ${cmd.help.name}' for more information.`)
|
||||||
|
channel.send(embed).then(msg => {
|
||||||
|
msg.delete({ timeout: 60000 })
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Simple check to see if someone is a developer or not
|
// Simple check to see if someone is a developer or not
|
||||||
isDeveloper (userID) {
|
isDeveloper (userID) {
|
||||||
let isDev = false;
|
let isDev = false;
|
||||||
|
@ -14,7 +28,6 @@ class Functions {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(isDev);
|
|
||||||
return isDev;
|
return isDev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue