use this.client.ownerID instead of taking it from config.json

This commit is contained in:
loicbersier 2019-11-25 22:03:50 +01:00
parent 425304646a
commit baed726e68
4 changed files with 6 additions and 7 deletions

View file

@ -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) {

View file

@ -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;

View file

@ -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"

View file

@ -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;
}