diff --git a/commands/admin/tag.js b/commands/admin/tag.js index 513681e..dd758f7 100644 --- a/commands/admin/tag.js +++ b/commands/admin/tag.js @@ -1,6 +1,6 @@ const { Command } = require('discord-akairo'); const Tag = require('../../models').Tag; -const { prefix, ownerID } = require('../../config.json'); +const { prefix } = require('../../config.json'); class TagCommand extends Command { constructor() { @@ -38,6 +38,8 @@ class TagCommand extends Command { async exec(message, args) { const tag = await Tag.findOne({where: {trigger: args.trigger, serverID: message.guild.id}}); + const ownerID = this.client.ownerID; + if (args.remove) { if (tag) { diff --git a/commands/hidden/owned.js b/commands/hidden/owned.js index 04b906e..5d7e365 100644 --- a/commands/hidden/owned.js +++ b/commands/hidden/owned.js @@ -1,5 +1,4 @@ const { Command } = require('discord-akairo'); -const { ownerID } = require('../../config.json'); class OwnedCommand extends Command { constructor() { @@ -30,7 +29,7 @@ class OwnedCommand extends Command { if (args.member.id == this.client.user.id) { return message.channel.send('You really thought you could own me?, pathetic...'); - } else if (args.member.id == ownerID) { + } else if (args.member.id == this.client.ownerID) { return message.channel.send('You really thought you could own him?, pathetic...'); } else if (args.member.id == '286054184623538177' || args.member.id == '172112210863194113') { owned = message.author; diff --git a/commands/utility/about.js b/commands/utility/about.js index 6fe7deb..f76f310 100644 --- a/commands/utility/about.js +++ b/commands/utility/about.js @@ -1,5 +1,4 @@ const { Command } = require('discord-akairo'); -const { ownerID } = require('../../config.json'); const donator = require('../../models').donator; class aboutCommand extends Command { @@ -35,7 +34,7 @@ class aboutCommand extends Command { .setAuthor(this.client.user.username, this.client.user.avatarURL()) .setTitle('About me') .setDescription(description) - .addField('Current owner: ', `${this.client.users.get(ownerID).username}#${this.client.users.get(ownerID).discriminator} (${ownerID})`) + .addField('Current owner: ', `${this.client.users.get(this.client.ownerID).username}#${this.client.users.get(this.client.ownerID).discriminator} (${this.client.ownerID})`) .addField('Gitlab', 'https://gitlab.com/LoicBersier/DiscordBot', true) .addField('Github', 'https://github.com/loicbersier/Haha-yes', true) .setFooter(`Original bot made by ${this.client.users.get('267065637183029248').username}#${this.client.users.get('267065637183029248').discriminator} (267065637183029248)`); // Please don't change the "original bot made by" diff --git a/event/listeners/commandblocked.js b/event/listeners/commandblocked.js index 9ea5b6d..49852a0 100644 --- a/event/listeners/commandblocked.js +++ b/event/listeners/commandblocked.js @@ -1,5 +1,4 @@ const { Listener } = require('discord-akairo'); -const { ownerID } = require('../../config.json'); class CommandBlockedListener extends Listener { constructor() { @@ -31,7 +30,7 @@ class CommandBlockedListener extends Listener { message.reply(blacklistMessage); break; case 'serverblacklist': - message.channel.send(`This server have been blacklisted... to appeal contact ${this.client.users.get(ownerID).username}#${this.client.users.get(ownerID).discriminator}, and now i will yeet out of here`); + message.channel.send(`This server have been blacklisted... to appeal contact ${this.client.users.get(this.client.ownerID).username}#${this.client.users.get(this.client.ownerID).discriminator}, and now i will yeet out of here`); message.guild.leave(); break; }