mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-07 18:41:26 +03:00
Fixes and improvements for database and other things
Also continued to add to ticket creation stuff - now includes opening questions
This commit is contained in:
@@ -61,6 +61,27 @@ module.exports = class CommandManager {
|
||||
* @param {Message} message - Command message
|
||||
*/
|
||||
async handle(message) {
|
||||
let is_blacklisted = false;
|
||||
if (settings.blacklist.includes(message.author.id)) {
|
||||
is_blacklisted = true;
|
||||
this.client.log.info(`Ignoring blacklisted member ${message.author.tag}`);
|
||||
} else {
|
||||
settings.blacklist.forEach(element => {
|
||||
if (message.guild.roles.cache.has(element) && message.member.roles.cache.has(element)) {
|
||||
is_blacklisted = true;
|
||||
this.client.log.info(`Ignoring member ${message.author.tag} with blacklisted role`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (is_blacklisted) {
|
||||
try {
|
||||
return message.react('❌');
|
||||
} catch (error) {
|
||||
return this.client.log.warn('Failed to react to a message');
|
||||
}
|
||||
}
|
||||
|
||||
let settings = await message.guild.settings;
|
||||
|
||||
const i18n = this.client.i18n.get(settings.locale);
|
||||
|
Reference in New Issue
Block a user