Compare commits
No commits in common. "145edfac7645a748d8b211afbe2e392d15a4326d" and "80a40cd9dca59ad4f07d8044a3e7602ee7d7679e" have entirely different histories.
145edfac76
...
80a40cd9dc
6 changed files with 14 additions and 14 deletions
|
@ -33,7 +33,7 @@ class tweetCommand extends Command {
|
||||||
async exec(message, args) {
|
async exec(message, args) {
|
||||||
if (args.text) {
|
if (args.text) {
|
||||||
// Very simple link detection
|
// Very simple link detection
|
||||||
if (new RegExp('([a-zA-Z0-9]+://)?([a-zA-Z0-9_]+:[a-zA-Z0-9_]+@)?([a-zA-Z0-9.-]+\\.[A-Za-z]{2,4})(:[0-9]+)?(/.*)?').test(args.text) && !args.text.includes('twitter.com')) return message.channel.send('You may not tweet links outside of twitter.com');
|
if (args.text.includes('http') && !args.text.includes('twitter.com')) return message.channel.send('You may not tweet links outside of twitter.com');
|
||||||
// Do not allow discord invites
|
// Do not allow discord invites
|
||||||
if (args.text.includes('discord.gg') || args.text.includes('discord.com/invite/')) return message.channel.send('No discord invite allowed.');
|
if (args.text.includes('discord.gg') || args.text.includes('discord.com/invite/')) return message.channel.send('No discord invite allowed.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ 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).tag} (${args.id}) ${userComment}`);
|
return message.channel.send(`A new donator have been added! ${this.client.users.resolveID(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;
|
||||||
|
@ -70,9 +70,9 @@ class addDonatorCommand extends Command {
|
||||||
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).tag} (${args.id})`);
|
return message.channel.send(`Removed the comment from ${this.client.users.resolveID(args.id).tag} (${args.id})`);
|
||||||
} else {
|
} else {
|
||||||
return message.channel.send(`You edited the comment for ${this.client.users.resolve(args.id).tag} (${args.id}) with ${args.userComment}`);
|
return message.channel.send(`You edited the comment for ${this.client.users.resolveID(args.id).tag} (${args.id}) with ${args.userComment}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -22,12 +22,12 @@ 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').tag} (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.resolveID('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++) {
|
||||||
if (this.client.users.resolve(Donator[i].get('userID').toString()) !== null)
|
if (this.client.users.resolveID(Donator[i].get('userID').toString()) !== null)
|
||||||
description += `**${this.client.users.resolve(Donator[i].get('userID').toString()).tag} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`;
|
description += `**${this.client.users.resolveID(Donator[i].get('userID').toString()).tag} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`;
|
||||||
else
|
else
|
||||||
description += `**A user of discord (${Donator[i].get('userID')}) | ${Donator[i].get('comment')} (This user no longer share a server with the bot)**\n`;
|
description += `**A user of discord (${Donator[i].get('userID')}) | ${Donator[i].get('comment')} (This user no longer share a server with the bot)**\n`;
|
||||||
}
|
}
|
||||||
|
@ -45,12 +45,12 @@ 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).tag} (${this.client.ownerID})`)
|
.addField('Current owner: ', `${this.client.users.resolveID(this.client.ownerID).tag} (${this.client.ownerID})`)
|
||||||
.addField('Gitea (Main)', 'https://git.namejeff.xyz/Supositware/Haha-Yes', true)
|
|
||||||
.addField('Gitlab (Mirror)', 'https://gitlab.com/LoicBersier/DiscordBot', true)
|
.addField('Gitlab (Mirror)', 'https://gitlab.com/LoicBersier/DiscordBot', true)
|
||||||
.addField('Github (Mirror)', 'https://github.com/loicbersier/Haha-yes', true)
|
.addField('Github (Mirror)', 'https://github.com/loicbersier/Haha-yes', true)
|
||||||
|
.addField('Gitea', 'https://git.namejeff.xyz/Supositware/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').tag} (267065637183029248)`); // Please this line
|
.setFooter(`Original bot made by ${this.client.users.resolveID('267065637183029248').tag} (267065637183029248)`); // Please this line
|
||||||
|
|
||||||
message.channel.send(aboutEmbed);
|
message.channel.send(aboutEmbed);
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,8 +22,8 @@ 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++) {
|
||||||
if (this.client.users.resolve(Donator[i].get('userID').toString()) !== null)
|
if (this.client.users.resolveID(Donator[i].get('userID').toString()) !== null)
|
||||||
donatorMessage += `**${this.client.users.resolve(Donator[i].get('userID').toString()).tag} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`;
|
donatorMessage += `**${this.client.users.resolveID(Donator[i].get('userID').toString()).tag} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`;
|
||||||
else
|
else
|
||||||
donatorMessage += `**A user of discord (${Donator[i].get('userID')}) | ${Donator[i].get('comment')} (This user no longer share a server with the bot)**\n`;
|
donatorMessage += `**A user of discord (${Donator[i].get('userID')}) | ${Donator[i].get('comment')} (This user no longer share a server with the bot)**\n`;
|
||||||
|
|
||||||
|
|
|
@ -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).tag}, and now i will yeet out of here`);
|
Embed.setDescription(`This server have been blacklisted... to appeal contact ${this.client.users.resolveID(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;
|
||||||
|
|
|
@ -23,7 +23,7 @@ class ReadyListener extends Listener {
|
||||||
let channelSize = this.client.channels.cache.size;
|
let channelSize = this.client.channels.cache.size;
|
||||||
let profilePicture = this.client.user.displayAvatarURL();
|
let profilePicture = this.client.user.displayAvatarURL();
|
||||||
let clientID = this.client.user.id;
|
let clientID = this.client.user.id;
|
||||||
let author = this.client.users.resolve(ownerID).tag;
|
let author = this.client.users.resolveID(ownerID).tag;
|
||||||
|
|
||||||
|
|
||||||
// Send stats to the console
|
// Send stats to the console
|
||||||
|
|
Loading…
Reference in a new issue