Skip to content

Commit

Permalink
Fix #21
Browse files Browse the repository at this point in the history
  • Loading branch information
LoboMetalurgico committed Aug 11, 2020
1 parent 146dd8d commit 235d250
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion languages
13 changes: 7 additions & 6 deletions src/Events/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

const Discord = require('discord.js');
var { database, config, links } = require('../../Configs');
const { utils, cooldown } = require('../Utils');
const { cooldown, utils } = require('../Utils');

exports.run = async (aruna, message) => {
if (message.author.bot) return;
Expand Down Expand Up @@ -87,11 +87,12 @@ exports.run = async (aruna, message) => {
const mention = [`<@${aruna.user.id}>`, `<@!${aruna.user.id}>`];

mention.find(mention => {
if (!message.guild.members.get(aruna.user.id).hasPermission('USE_EXTERNAL_EMOJIS')) {
return message.reply(emojiError);
} else if (!message.guild.members.get(aruna.user.id).hasPermission('EMBED_LINKS')) {
return message.reply(linkError);
} else if (message.content === mention) {
if (message.content === mention) {
if (!message.guild.members.get(aruna.user.id).hasPermission('USE_EXTERNAL_EMOJIS')) {
return message.reply(emojiError);
} else if (!message.guild.members.get(aruna.user.id).hasPermission('EMBED_LINKS')) {
return message.reply(linkError);
}
const embed = new Discord.RichEmbed()
.setTitle(lang.message.mention.title)
.setDescription(
Expand Down
10 changes: 5 additions & 5 deletions src/Utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
*/

module.exports = {
utils: require('./utils.js'),
ranksystem: require('./rankSystem.js'),
emojis: require('./emojis.js'),
emoji: require('./emojis.js'),
activeticket: require('./activeTicket.js'),
cooldown: require('./cooldown.js'),
date: require('./date.js')
date: require('./date.js'),
emoji: require('./emojis.js'),
emojis: require('./emojis.js'),
ranksystem: require('./rankSystem.js'),
utils: require('./utils.js')
};

0 comments on commit 235d250

Please sign in to comment.