Some changes

This commit is contained in:
Christer Warén
2020-03-08 16:22:00 +02:00
parent af44f182f6
commit 60cf8df203
16 changed files with 65 additions and 46 deletions

View File

@ -2,8 +2,7 @@ module.exports = {
name: 'message',
async execute(client, msg, Discord) {
if (msg.author.bot || !msg.guild) return;
let prefix = client.config.prefix
if (client.config.devMode) prefix = client.config.devPrefix;
let prefix = client.config.prefix;
const args = msg.content.slice(prefix.length).split(' ');
if (msg.mentions.users.first()) {
if (msg.mentions.users.first().id === client.user.id) {
@ -20,8 +19,6 @@ module.exports = {
const commandName = args[0].toLowerCase();
const command = client.commands.get(commandName) || client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName)) || client.commandAliases.get(commandName);
if (!command && msg.content !== `${prefix}`) return;
if (command.onlyDev && msg.author.id !== client.config.devId) return msg.channel.send('<:redx:674263474704220182> You are not allowed to do that!');
if (client.config.devMode && msg.member.id !== client.config.devId) return msg.channel.send('<:redx:674263474704220182> Dev mode has been turned on! Commands are only available to developer(s)!');
client.funcs.exe(msg, args, client, Discord, prefix, command);
}
}

View File

@ -1,9 +1,8 @@
module.exports = {
name: 'ready',
async execute(client, Discord) {
if (client.config.devMode) {
console.log('dev mode');
}
console.log('- Activated -');
console.log('RadioX');
console.log('We will bring you finnish radio to your discord server');
console.log('(c)2020 EximiaBots by Warén Media / Christer Warén & MatteZ02');
}
}
}