forked from Supositware/Haha-Yes
Replaced username and discriminator with tag
Signed-off-by: loicbersier <loic.bersier1@gmail.com>
This commit is contained in:
parent
4d1dc6037e
commit
101d7b18a4
5 changed files with 16 additions and 16 deletions
|
@ -43,21 +43,21 @@ class addDonatorCommand extends Command {
|
||||||
if (!Donator) {
|
if (!Donator) {
|
||||||
const body = {userID: args.id, comment: userComment};
|
const body = {userID: args.id, comment: userComment};
|
||||||
donator.create(body);
|
donator.create(body);
|
||||||
return message.channel.send(`A new donator have been added! ${this.client.users.resolve(args.id).username}#${this.client.users.resolve(args.id).discriminator} (${args.id}) ${userComment}`);
|
return message.channel.send(`A new donator have been added! ${this.client.users.resolve(args.id).tag} (${args.id}) ${userComment}`);
|
||||||
} else {
|
} else {
|
||||||
message.channel.send('This donator already exist, do you want to update it? y/n');
|
message.channel.send('This donator already exist, do you want to update it? y/n');
|
||||||
const filter = m => m.content && m.author.id == message.author.id;
|
const filter = m => m.content && m.author.id === message.author.id;
|
||||||
message.channel.awaitMessages(filter, {time: 5000 * 1000, max: 1, errors: ['time'] })
|
message.channel.awaitMessages(filter, {time: 5000 * 1000, max: 1, errors: ['time'] })
|
||||||
.then(messages => {
|
.then(messages => {
|
||||||
let messageContent = messages.map(messages => messages.content);
|
let messageContent = messages.map(messages => messages.content);
|
||||||
if (messageContent == 'y' || messageContent == 'yes') {
|
if (messageContent === 'y' || messageContent === 'yes') {
|
||||||
const body = {comment: userComment};
|
const body = {comment: userComment};
|
||||||
donator.update(body, {where: {userID: args.id}});
|
donator.update(body, {where: {userID: args.id}});
|
||||||
console.log(userComment);
|
console.log(userComment);
|
||||||
if (userComment == '') {
|
if (userComment === '') {
|
||||||
return message.channel.send(`Removed the comment from ${this.client.users.resolve(args.id).username}#${this.client.users.resolve(args.id).discriminator} (${args.id})`);
|
return message.channel.send(`Removed the comment from ${this.client.users.resolve(args.id).tag} (${args.id})`);
|
||||||
} else {
|
} else {
|
||||||
return message.channel.send(`You edited the comment for ${this.client.users.resolve(args.id).username}#${this.client.users.resolve(args.id).discriminator} (${args.id}) with ${args.userComment}`);
|
return message.channel.send(`You edited the comment for ${this.client.users.resolve(args.id).tag} (${args.id}) with ${args.userComment}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -32,16 +32,16 @@ class blacklistCommand extends Command {
|
||||||
if (!blacklist) {
|
if (!blacklist) {
|
||||||
const body = {userID: args.userID};
|
const body = {userID: args.userID};
|
||||||
userBlacklist.create(body);
|
userBlacklist.create(body);
|
||||||
return message.channel.send(`The following user have been blacklisted: ${this.client.users.resolve(args.userID).username}#${this.client.users.resolve(args.userID).discriminator} (${args.userID})`);
|
return message.channel.send(`The following user have been blacklisted: ${this.client.users.resolve(args.userID).tag} (${args.userID})`);
|
||||||
} else {
|
} else {
|
||||||
message.channel.send('This user is already blacklisted, do you want to unblacklist him? y/n');
|
message.channel.send('This user is already blacklisted, do you want to unblacklist him? y/n');
|
||||||
const filter = m => m.content && m.author.id == message.author.id;
|
const filter = m => m.content && m.author.id === message.author.id;
|
||||||
message.channel.awaitMessages(filter, {time: 5000 * 1000, max: 1, errors: ['time'] })
|
message.channel.awaitMessages(filter, {time: 5000 * 1000, max: 1, errors: ['time'] })
|
||||||
.then(messages => {
|
.then(messages => {
|
||||||
let messageContent = messages.map(messages => messages.content);
|
let messageContent = messages.map(messages => messages.content);
|
||||||
if (messageContent == 'y' || messageContent == 'yes') {
|
if (messageContent === 'y' || messageContent === 'yes') {
|
||||||
userBlacklist.destroy({where: {userID:args.userID}});
|
userBlacklist.destroy({where: {userID:args.userID}});
|
||||||
return message.channel.send(`The following user have been unblacklisted: ${this.client.users.resolve(args.userID).username}#${this.client.users.resolve(args.userID).discriminator} (${args.userID})`);
|
return message.channel.send(`The following user have been unblacklisted: ${this.client.users.resolve(args.userID).tag} (${args.userID})`);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
|
|
@ -20,11 +20,11 @@ class aboutCommand extends Command {
|
||||||
async exec(message) {
|
async exec(message) {
|
||||||
const Donator = await donator.findAll({order: ['id']});
|
const Donator = await donator.findAll({order: ['id']});
|
||||||
|
|
||||||
let description = `This bot is made using [discord.js](https://github.com/discordjs/discord.js) & [Discord-Akairo](https://github.com/discord-akairo/discord-akairo)\nHelp command from [hoshi](https://github.com/1Computer1/hoshi)\n[Rantionary](https://github.com/RantLang/Rantionary) for their dictionnary.\nThanks to ${this.client.users.resolve('336492042299637771').username}#${this.client.users.resolve('336492042299637771').discriminator} (336492042299637771) for inspiring me for making this bot!\n\nThe people who donated for the bot <3\n`;
|
let description = `This bot is made using [discord.js](https://github.com/discordjs/discord.js) & [Discord-Akairo](https://github.com/discord-akairo/discord-akairo)\nHelp command from [hoshi](https://github.com/1Computer1/hoshi)\n[Rantionary](https://github.com/RantLang/Rantionary) for their dictionnary.\nThanks to ${this.client.users.resolve('336492042299637771').tag} (336492042299637771) for inspiring me for making this bot!\n\nThe people who donated for the bot <3\n`;
|
||||||
|
|
||||||
if (Donator[0]) {
|
if (Donator[0]) {
|
||||||
for (let i = 0; i < Donator.length; i++) {
|
for (let i = 0; i < Donator.length; i++) {
|
||||||
description += `**${this.client.users.resolve(Donator[i].get('userID')).username}#${this.client.users.resolve(Donator[i].get('userID')).discriminator} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`;
|
description += `**${this.client.users.resolve(Donator[i].get('userID')).tag} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
description += 'No one :(\n';
|
description += 'No one :(\n';
|
||||||
|
@ -40,11 +40,11 @@ class aboutCommand extends Command {
|
||||||
.setTitle('About me')
|
.setTitle('About me')
|
||||||
.setDescription(description)
|
.setDescription(description)
|
||||||
.addField('Current commit', out.stdout)
|
.addField('Current commit', out.stdout)
|
||||||
.addField('Current owner: ', `${this.client.users.resolve(this.client.ownerID).username}#${this.client.users.resolve(this.client.ownerID).discriminator} (${this.client.ownerID})`)
|
.addField('Current owner: ', `${this.client.users.resolve(this.client.ownerID).tag} (${this.client.ownerID})`)
|
||||||
.addField('Gitlab', 'https://gitlab.com/LoicBersier/DiscordBot', true)
|
.addField('Gitlab', 'https://gitlab.com/LoicBersier/DiscordBot', true)
|
||||||
.addField('Github', 'https://github.com/loicbersier/Haha-yes', true)
|
.addField('Github', 'https://github.com/loicbersier/Haha-yes', true)
|
||||||
.setThumbnail('https://its.gamingti.me/ZiRe.png')
|
.setThumbnail('https://its.gamingti.me/ZiRe.png')
|
||||||
.setFooter(`Original bot made by ${this.client.users.resolve('267065637183029248').username}#${this.client.users.resolve('267065637183029248').discriminator} (267065637183029248)`); // Please don't change the "original bot made by"
|
.setFooter(`Original bot made by ${this.client.users.resolve('267065637183029248').tag} (267065637183029248)`); // Please don't change the "original bot made by"
|
||||||
|
|
||||||
message.channel.send(aboutEmbed);
|
message.channel.send(aboutEmbed);
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,7 +22,7 @@ class donatorCommand extends Command {
|
||||||
|
|
||||||
if (Donator[0]) {
|
if (Donator[0]) {
|
||||||
for (let i = 0; i < Donator.length; i++) {
|
for (let i = 0; i < Donator.length; i++) {
|
||||||
donatorMessage += `**${this.client.users.resolve(Donator[i].get('userID')).username}#${this.client.users.resolve(Donator[i].get('userID')).discriminator} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`;
|
donatorMessage += `**${this.client.users.resolve(Donator[i].get('userID')).tag} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
donatorMessage += 'No one :(';
|
donatorMessage += 'No one :(';
|
||||||
|
|
|
@ -38,7 +38,7 @@ class CommandBlockedListener extends Listener {
|
||||||
break;
|
break;
|
||||||
case 'serverblacklist':
|
case 'serverblacklist':
|
||||||
Embed.setTitle('Server blacklisted.');
|
Embed.setTitle('Server blacklisted.');
|
||||||
Embed.setDescription(`This server have been blacklisted... to appeal contact ${this.client.users.resolve(this.client.ownerID).username}#${this.client.users.resolve(this.client.ownerID).discriminator}, and now i will yeet out of here`);
|
Embed.setDescription(`This server have been blacklisted... to appeal contact ${this.client.users.resolve(this.client.ownerID).tag}, and now i will yeet out of here`);
|
||||||
message.channel.send(Embed);
|
message.channel.send(Embed);
|
||||||
message.guild.leave();
|
message.guild.leave();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue