forked from Supositware/Haha-Yes
Fixed some errors
Signed-off-by: loicbersier <loic.bersier1@gmail.com>
This commit is contained in:
parent
200ad3b47a
commit
4f1f672d32
2 changed files with 8 additions and 3 deletions
|
@ -51,10 +51,11 @@ class commandStartedListener extends Listener {
|
|||
if (dailyStats) {
|
||||
if (command.category.id === 'owner') return; // Don't count owner command
|
||||
let obj = {
|
||||
guild: message.guild.id,
|
||||
command: command.id
|
||||
};
|
||||
|
||||
if (message.guild) obj.guild = message.guild.id;
|
||||
|
||||
report.push(obj);
|
||||
|
||||
let uniqueGuild = [];
|
||||
|
|
|
@ -41,8 +41,12 @@ class messageListener extends Listener {
|
|||
*/
|
||||
|
||||
// Banned words
|
||||
const bannedWords = await BannedWords.findAll({where: {word: Sequelize.where(Sequelize.fn('LOCATE', Sequelize.col('word'), message.content.replace(/\u200B/g, '').replace(/[\u0250-\ue007]/g, '')), Sequelize.Op.ne, 0), serverID: message.guild.id}});
|
||||
const whitelistWord = await WhitelistWord.findAll({where: {word: Sequelize.where(Sequelize.fn('LOCATE', Sequelize.col('word'), message.content.replace(/\u200B/g, '').replace(/[\u0250-\ue007]/g, '')), Sequelize.Op.ne, 0), serverID: message.guild.id}});
|
||||
let bannedWords;
|
||||
let whitelistWord;
|
||||
if (message.guild) {
|
||||
bannedWords = await BannedWords.findAll({where: {word: Sequelize.where(Sequelize.fn('LOCATE', Sequelize.col('word'), message.content.replace(/\u200B/g, '').replace(/[\u0250-\ue007]/g, '')), Sequelize.Op.ne, 0), serverID: message.guild.id}});
|
||||
whitelistWord = await WhitelistWord.findAll({where: {word: Sequelize.where(Sequelize.fn('LOCATE', Sequelize.col('word'), message.content.replace(/\u200B/g, '').replace(/[\u0250-\ue007]/g, '')), Sequelize.Op.ne, 0), serverID: message.guild.id}});
|
||||
}
|
||||
|
||||
if (whitelistWord[0]) {
|
||||
return; // If word is whitelisted just return
|
||||
|
|
Loading…
Reference in a new issue