Use discord-akairo embed
This commit is contained in:
parent
67a4bc0ef8
commit
8b889c7210
24 changed files with 31 additions and 55 deletions
|
@ -1,5 +1,4 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
const boards = require('4chan-boards');
|
const boards = require('4chan-boards');
|
||||||
const htmlToText = require('html-to-text');
|
const htmlToText = require('html-to-text');
|
||||||
|
@ -62,7 +61,7 @@ class FourchanCommand extends Command {
|
||||||
title = 'No title';
|
title = 'No title';
|
||||||
}
|
}
|
||||||
|
|
||||||
const FourchanEmbed = new MessageEmbed()
|
const FourchanEmbed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setTitle(title)
|
.setTitle(title)
|
||||||
.setDescription(htmlToText.fromString(description))
|
.setDescription(htmlToText.fromString(description))
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
|
|
||||||
class RedditCommand extends Command {
|
class RedditCommand extends Command {
|
||||||
|
@ -43,7 +42,7 @@ class RedditCommand extends Command {
|
||||||
let i = Math.floor((Math.random() * response.data.children.length));
|
let i = Math.floor((Math.random() * response.data.children.length));
|
||||||
if (response.data.children[i].data.over_18 == true && !message.channel.nsfw)
|
if (response.data.children[i].data.over_18 == true && !message.channel.nsfw)
|
||||||
return message.channel.send('No nsfw');
|
return message.channel.send('No nsfw');
|
||||||
const redditEmbed = new MessageEmbed()
|
const redditEmbed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setTitle(response.data.children[i].data.title)
|
.setTitle(response.data.children[i].data.title)
|
||||||
.setDescription(response.data.children[i].data.selftext)
|
.setDescription(response.data.children[i].data.selftext)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
|
|
||||||
class AdviceCommand extends Command {
|
class AdviceCommand extends Command {
|
||||||
|
@ -20,7 +19,7 @@ class AdviceCommand extends Command {
|
||||||
fetch('http://api.adviceslip.com/advice').then((response) => {
|
fetch('http://api.adviceslip.com/advice').then((response) => {
|
||||||
return response.json();
|
return response.json();
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
const adviceEmbed = new MessageEmbed()
|
const adviceEmbed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setTitle(response.slip.slip_id)
|
.setTitle(response.slip.slip_id)
|
||||||
.setDescription(response.slip.advice);
|
.setDescription(response.slip.advice);
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
const rand = require('../../rand.js');
|
const rand = require('../../rand.js');
|
||||||
|
|
||||||
class SayCommand extends Command {
|
class SayCommand extends Command {
|
||||||
|
@ -130,7 +129,7 @@ class SayCommand extends Command {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const embed = new MessageEmbed()
|
const embed = this.client.util.embed()
|
||||||
.setColor(color)
|
.setColor(color)
|
||||||
.setTitle(title)
|
.setTitle(title)
|
||||||
.setImage(image)
|
.setImage(image)
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const Twitter = require('twitter-lite');
|
const Twitter = require('twitter-lite');
|
||||||
const rand = require('../../rand.js');
|
const rand = require('../../rand.js');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
//const Filter = require('bad-words');
|
//const Filter = require('bad-words');
|
||||||
//let filter = new Filter();
|
//let filter = new Filter();
|
||||||
const TwitterBlacklist = require('../../models').TwitterBlacklist;
|
const TwitterBlacklist = require('../../models').TwitterBlacklist;
|
||||||
|
@ -84,7 +83,7 @@ class tweetCommand extends Command {
|
||||||
|
|
||||||
const tweetid = response.id_str;
|
const tweetid = response.id_str;
|
||||||
|
|
||||||
const publicEmbed = new MessageEmbed()
|
const publicEmbed = this.client.util.embed()
|
||||||
.setAuthor('Some user of discord said...')
|
.setAuthor('Some user of discord said...')
|
||||||
.setDescription(args.text)
|
.setDescription(args.text)
|
||||||
.addField('Link', `https://twitter.com/HahaYesDB/status/${tweetid}`)
|
.addField('Link', `https://twitter.com/HahaYesDB/status/${tweetid}`)
|
||||||
|
@ -94,7 +93,7 @@ class tweetCommand extends Command {
|
||||||
let channel = this.client.channels.get('597964498921455637');
|
let channel = this.client.channels.get('597964498921455637');
|
||||||
channel.send({embed: publicEmbed});
|
channel.send({embed: publicEmbed});
|
||||||
|
|
||||||
const Embed = new MessageEmbed()
|
const Embed = this.client.util.embed()
|
||||||
.setAuthor(message.author.username, message.author.displayAvatarURL())
|
.setAuthor(message.author.username, message.author.displayAvatarURL())
|
||||||
.setDescription(args.text)
|
.setDescription(args.text)
|
||||||
.addField('Link', `https://twitter.com/HahaYesDB/status/${tweetid}`, true)
|
.addField('Link', `https://twitter.com/HahaYesDB/status/${tweetid}`, true)
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
// Higher the level the less time you have to complete it
|
// Higher the level the less time you have to complete it
|
||||||
// Make the command less shit
|
// Make the command less shit
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
const borgar = require('../../models').borgar;
|
const borgar = require('../../models').borgar;
|
||||||
|
|
||||||
class borgarCommand extends Command {
|
class borgarCommand extends Command {
|
||||||
|
@ -57,7 +56,7 @@ class borgarCommand extends Command {
|
||||||
hamIngredient.push('bun');
|
hamIngredient.push('bun');
|
||||||
|
|
||||||
|
|
||||||
let borgarEmbed = new MessageEmbed()
|
let borgarEmbed = this.client.util.embed()
|
||||||
.setTitle('hamborger info')
|
.setTitle('hamborger info')
|
||||||
.setDescription(`could you do me an **amborgar** that contain **${hamIngredient}**`)
|
.setDescription(`could you do me an **amborgar** that contain **${hamIngredient}**`)
|
||||||
.setFooter(`Level ${level} | Once the ingredients dissapear you have 10 seconds to do it!`)
|
.setFooter(`Level ${level} | Once the ingredients dissapear you have 10 seconds to do it!`)
|
||||||
|
@ -66,7 +65,7 @@ class borgarCommand extends Command {
|
||||||
message.util.send(borgarEmbed)
|
message.util.send(borgarEmbed)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
borgarEmbed = new MessageEmbed()
|
borgarEmbed = this.client.util.embed()
|
||||||
.setTitle('hamborger delivery')
|
.setTitle('hamborger delivery')
|
||||||
.setDescription('You have to put each ingredients in seperate messages!')
|
.setDescription('You have to put each ingredients in seperate messages!')
|
||||||
.setFooter(`Level ${level} | you have 10 seconds to make that hamborgor`)
|
.setFooter(`Level ${level} | you have 10 seconds to make that hamborgor`)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const guessLeaderboard = require('../../models').guessLeaderboard;
|
const guessLeaderboard = require('../../models').guessLeaderboard;
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
|
|
||||||
class guessCommand extends Command {
|
class guessCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -36,7 +35,7 @@ class guessCommand extends Command {
|
||||||
if (args.leaderboard) {
|
if (args.leaderboard) {
|
||||||
const leaderboard = await guessLeaderboard.findAll({order: ['try']});
|
const leaderboard = await guessLeaderboard.findAll({order: ['try']});
|
||||||
let top = [];
|
let top = [];
|
||||||
let leaderboardEmbed = new MessageEmbed()
|
let leaderboardEmbed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setTitle('Guess leaderboard');
|
.setTitle('Guess leaderboard');
|
||||||
for (let i = 0; i < leaderboard.length; i++) {
|
for (let i = 0; i < leaderboard.length; i++) {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
|
|
||||||
class EvalCommand extends Command {
|
class EvalCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -37,7 +36,7 @@ class EvalCommand extends Command {
|
||||||
if (typeof evaled !== 'string')
|
if (typeof evaled !== 'string')
|
||||||
evaled = require('util').inspect(evaled);
|
evaled = require('util').inspect(evaled);
|
||||||
|
|
||||||
const evalEmbed = new MessageEmbed()
|
const evalEmbed = this.client.util.embed()
|
||||||
.setColor('#00FF00')
|
.setColor('#00FF00')
|
||||||
.setTitle('<a:orangejustice:522142267490697236> Eval succes <a:orangejustice:522142267490697236>')
|
.setTitle('<a:orangejustice:522142267490697236> Eval succes <a:orangejustice:522142267490697236>')
|
||||||
.setThumbnail('https://cdn4.iconfinder.com/data/icons/gradient-ui-1/512/success-512.png')
|
.setThumbnail('https://cdn4.iconfinder.com/data/icons/gradient-ui-1/512/success-512.png')
|
||||||
|
@ -47,7 +46,7 @@ class EvalCommand extends Command {
|
||||||
|
|
||||||
message.channel.send(evalEmbed);
|
message.channel.send(evalEmbed);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const errorEmbed = new MessageEmbed()
|
const errorEmbed = this.client.util.embed()
|
||||||
.setColor('#FF0000')
|
.setColor('#FF0000')
|
||||||
.setTitle('Eval failed <:sadpepe:534399181679230986>')
|
.setTitle('Eval failed <:sadpepe:534399181679230986>')
|
||||||
.setThumbnail('https://cdn4.iconfinder.com/data/icons/the-weather-is-nice-today/64/weather_48-512.png')
|
.setThumbnail('https://cdn4.iconfinder.com/data/icons/the-weather-is-nice-today/64/weather_48-512.png')
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const util = require('util');
|
const util = require('util');
|
||||||
const exec = util.promisify(require('child_process').exec);
|
const exec = util.promisify(require('child_process').exec);
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
|
|
||||||
class EvalCommand extends Command {
|
class EvalCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -20,7 +19,7 @@ class EvalCommand extends Command {
|
||||||
async exec(message) {
|
async exec(message) {
|
||||||
async function update() {
|
async function update() {
|
||||||
const { stdout, stderr } = await exec('git pull');
|
const { stdout, stderr } = await exec('git pull');
|
||||||
const Embed = new MessageEmbed()
|
const Embed = this.client.util.embed()
|
||||||
.addField('stdout', stdout)
|
.addField('stdout', stdout)
|
||||||
.addField('stderr', stderr);
|
.addField('stderr', stderr);
|
||||||
message.channel.send({embed: Embed});
|
message.channel.send({embed: Embed});
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
const { ownerID } = require('../../config.json');
|
const { ownerID } = require('../../config.json');
|
||||||
const donator = require('../../models').donator;
|
const donator = require('../../models').donator;
|
||||||
|
|
||||||
|
@ -31,7 +30,7 @@ class aboutCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const aboutEmbed = new MessageEmbed()
|
const aboutEmbed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setAuthor(this.client.user.username, this.client.user.avatarURL())
|
.setAuthor(this.client.user.username, this.client.user.avatarURL())
|
||||||
.setTitle('About me')
|
.setTitle('About me')
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
|
|
||||||
class donateCommand extends Command {
|
class donateCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -16,7 +15,7 @@ class donateCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message) {
|
async exec(message) {
|
||||||
const Embed = new MessageEmbed()
|
const Embed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setTitle('Donation link')
|
.setTitle('Donation link')
|
||||||
.setDescription('If you decide to donate, please use the feedback command to let the owner know about it so he can put you in the about and donator command\n[Paypal](https://www.paypal.me/supositware)\n[Patreon](https://www.patreon.com/bePatron?u=15330358)\n[Brave referal program](https://brave.com/hah459)\nTip me with Brave BAT token on [my website](https://namejeff.xyz/)');
|
.setDescription('If you decide to donate, please use the feedback command to let the owner know about it so he can put you in the about and donator command\n[Paypal](https://www.paypal.me/supositware)\n[Patreon](https://www.patreon.com/bePatron?u=15330358)\n[Brave referal program](https://brave.com/hah459)\nTip me with Brave BAT token on [my website](https://namejeff.xyz/)');
|
||||||
|
|
|
@ -3,7 +3,6 @@ const fs = require('fs');
|
||||||
const youtubedl = require('youtube-dl');
|
const youtubedl = require('youtube-dl');
|
||||||
const hbjs = require('handbrake-js');
|
const hbjs = require('handbrake-js');
|
||||||
const os = require('os');
|
const os = require('os');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
|
|
||||||
class DownloadCommand extends Command {
|
class DownloadCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -51,7 +50,7 @@ class DownloadCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Embed = new MessageEmbed()
|
const Embed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setAuthor(`Downloaded by ${message.author.username}`, message.author.displayAvatarURL(), link)
|
.setAuthor(`Downloaded by ${message.author.username}`, message.author.displayAvatarURL(), link)
|
||||||
.setDescription(args.caption)
|
.setDescription(args.caption)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const { feedbackChannel } = require('../../config.json');
|
const { feedbackChannel } = require('../../config.json');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
|
|
||||||
class FeedbackCommand extends Command {
|
class FeedbackCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -35,7 +34,7 @@ class FeedbackCommand extends Command {
|
||||||
|
|
||||||
const channel = this.client.channels.get(feedbackChannel);
|
const channel = this.client.channels.get(feedbackChannel);
|
||||||
|
|
||||||
const Embed = new MessageEmbed()
|
const Embed = this.client.util.embed()
|
||||||
.setAuthor(`${message.author.username} (${message.author.id})`, message.author.displayAvatarURL())
|
.setAuthor(`${message.author.username} (${message.author.id})`, message.author.displayAvatarURL())
|
||||||
.addField('Guild', `${message.guild.name} (${message.guild.id})`, true)
|
.addField('Guild', `${message.guild.name} (${message.guild.id})`, true)
|
||||||
.addField('Feedback', args.text)
|
.addField('Feedback', args.text)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const BannedWords = require('../../models').bannedWords;
|
const BannedWords = require('../../models').bannedWords;
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
|
|
||||||
|
|
||||||
class seebannedwordCommand extends Command {
|
class seebannedwordCommand extends Command {
|
||||||
|
@ -31,7 +30,7 @@ class seebannedwordCommand extends Command {
|
||||||
|
|
||||||
if (list == undefined) return message.channel.send('No word are banned yet.');
|
if (list == undefined) return message.channel.send('No word are banned yet.');
|
||||||
|
|
||||||
const Embed = new MessageEmbed()
|
const Embed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setTitle('List of banned words')
|
.setTitle('List of banned words')
|
||||||
.setDescription(list);
|
.setDescription(list);
|
||||||
|
|
|
@ -2,8 +2,6 @@ const { Command } = require('discord-akairo');
|
||||||
const Tag = require('../../models').Tag;
|
const Tag = require('../../models').Tag;
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const os = require('os');
|
const os = require('os');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
|
|
||||||
|
|
||||||
class seetagCommand extends Command {
|
class seetagCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -38,7 +36,7 @@ class seetagCommand extends Command {
|
||||||
if (!tagList) return message.channel.send('Tag not found.');
|
if (!tagList) return message.channel.send('Tag not found.');
|
||||||
this.client.users.fetch(tagList.dataValues.ownerID)
|
this.client.users.fetch(tagList.dataValues.ownerID)
|
||||||
.then(user => {
|
.then(user => {
|
||||||
const TagEmbed = new MessageEmbed()
|
const TagEmbed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setTitle(message.guild.name)
|
.setTitle(message.guild.name)
|
||||||
.addField('Trigger:', tagList['dataValues']['trigger'])
|
.addField('Trigger:', tagList['dataValues']['trigger'])
|
||||||
|
@ -54,7 +52,7 @@ class seetagCommand extends Command {
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
const TagEmbed = new MessageEmbed()
|
const TagEmbed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setTitle(message.guild.name)
|
.setTitle(message.guild.name)
|
||||||
.addField('Trigger:', tagList['dataValues']['trigger'])
|
.addField('Trigger:', tagList['dataValues']['trigger'])
|
||||||
|
@ -83,7 +81,7 @@ class seetagCommand extends Command {
|
||||||
} else {
|
} else {
|
||||||
let tagList = await Tag.findAll({attributes: ['trigger'], where: {serverID: message.guild.id}});
|
let tagList = await Tag.findAll({attributes: ['trigger'], where: {serverID: message.guild.id}});
|
||||||
const tagString = tagList.map(t => t.trigger).join(', ') || 'No tags set.';
|
const tagString = tagList.map(t => t.trigger).join(', ') || 'No tags set.';
|
||||||
const TagEmbed = new MessageEmbed()
|
const TagEmbed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setTitle('List of tags')
|
.setTitle('List of tags')
|
||||||
.setDescription(tagString)
|
.setDescription(tagString)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
|
|
||||||
class ServerCommand extends Command {
|
class ServerCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -17,7 +16,7 @@ class ServerCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message) {
|
async exec(message) {
|
||||||
const addEmbed = new MessageEmbed()
|
const addEmbed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setTitle(message.guild.name)
|
.setTitle(message.guild.name)
|
||||||
.setThumbnail(message.guild.iconURL())
|
.setThumbnail(message.guild.iconURL())
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const akairoVersion = require('discord-akairo').version;
|
const akairoVersion = require('discord-akairo').version;
|
||||||
const { MessageEmbed, version } = require('discord.js');
|
const { version } = require('discord.js');
|
||||||
const util = require('util');
|
const util = require('util');
|
||||||
const exec = util.promisify(require('child_process').exec);
|
const exec = util.promisify(require('child_process').exec);
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ class StatsCommand extends Command {
|
||||||
cpu = stdout.replace('Name', '');
|
cpu = stdout.replace('Name', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
const statsEmbed = new MessageEmbed()
|
const statsEmbed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setTitle('Bot stats')
|
.setTitle('Bot stats')
|
||||||
.setAuthor('Haha yes')
|
.setAuthor('Haha yes')
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
const { yandexAPI } = require('../../config.json');
|
const { yandexAPI } = require('../../config.json');
|
||||||
|
|
||||||
|
@ -51,7 +50,7 @@ class TranslationCommand extends Command {
|
||||||
return message.channel.send('An error has occured');
|
return message.channel.send('An error has occured');
|
||||||
|
|
||||||
|
|
||||||
const translationEmbed = new MessageEmbed()
|
const translationEmbed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setTitle('Asked for the following translation:')
|
.setTitle('Asked for the following translation:')
|
||||||
.setAuthor(message.author.username)
|
.setAuthor(message.author.username)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
|
|
||||||
class UpdootCommand extends Command {
|
class UpdootCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -17,7 +16,7 @@ class UpdootCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message) {
|
async exec(message) {
|
||||||
const upDoot = new MessageEmbed()
|
const upDoot = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setTitle('Vote for my bot')
|
.setTitle('Vote for my bot')
|
||||||
.setAuthor(message.author.username)
|
.setAuthor(message.author.username)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
|
|
||||||
class userInfoCommand extends Command {
|
class userInfoCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -31,7 +30,7 @@ class userInfoCommand extends Command {
|
||||||
|
|
||||||
let member = message.guild.member(user);
|
let member = message.guild.member(user);
|
||||||
|
|
||||||
const Embed = new MessageEmbed()
|
const Embed = this.client.util.embed()
|
||||||
.setColor(member.displayHexColor)
|
.setColor(member.displayHexColor)
|
||||||
.setAuthor(`${user.tag} (${user.id})`, user.displayAvatarURL())
|
.setAuthor(`${user.tag} (${user.id})`, user.displayAvatarURL())
|
||||||
.addField('Current rank hex color', member.displayHexColor, true)
|
.addField('Current rank hex color', member.displayHexColor, true)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Listener } = require('discord-akairo');
|
const { Listener } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
const { statsChannel } = require('../../config.json');
|
const { statsChannel } = require('../../config.json');
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@ class guildCreateListener extends Listener {
|
||||||
async exec(guild) {
|
async exec(guild) {
|
||||||
console.log(`${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}`);
|
console.log(`${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}`);
|
||||||
const channel = this.client.channels.get(statsChannel);
|
const channel = this.client.channels.get(statsChannel);
|
||||||
const addEmbed = new MessageEmbed()
|
const addEmbed = this.client.util.embed()
|
||||||
.setColor('#52e80d')
|
.setColor('#52e80d')
|
||||||
.setTitle('New boiz in town')
|
.setTitle('New boiz in town')
|
||||||
.setURL('https://www.youtube.com/watch?v=6n3pFFPSlW4')
|
.setURL('https://www.youtube.com/watch?v=6n3pFFPSlW4')
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Listener } = require('discord-akairo');
|
const { Listener } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
const { statsChannel } = require('../../config.json');
|
const { statsChannel } = require('../../config.json');
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +14,7 @@ class guildCreateListener extends Listener {
|
||||||
console.log(`***BOT KICKED***\n${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}\n***BOT KICKED***`);
|
console.log(`***BOT KICKED***\n${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}\n***BOT KICKED***`);
|
||||||
const channel = this.client.channels.get(statsChannel);
|
const channel = this.client.channels.get(statsChannel);
|
||||||
|
|
||||||
const kickEmbed = new MessageEmbed()
|
const kickEmbed = this.client.util.embed()
|
||||||
.setColor('#FF0000')
|
.setColor('#FF0000')
|
||||||
.setTitle('Some mofo just removed me from there guild :(')
|
.setTitle('Some mofo just removed me from there guild :(')
|
||||||
.setURL('https://www.youtube.com/watch?v=6n3pFFPSlW4')
|
.setURL('https://www.youtube.com/watch?v=6n3pFFPSlW4')
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Listener } = require('discord-akairo');
|
const { Listener } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
const rand = require('../../rand.js');
|
const rand = require('../../rand.js');
|
||||||
const Sequelize = require('sequelize');
|
const Sequelize = require('sequelize');
|
||||||
const Tag = require('../../models').Tag;
|
const Tag = require('../../models').Tag;
|
||||||
|
@ -33,7 +32,7 @@ class messageListener extends Listener {
|
||||||
let regex = new RegExp(bannedWords[i].get('word'), 'g');
|
let regex = new RegExp(bannedWords[i].get('word'), 'g');
|
||||||
censoredMessage = censoredMessage.replace(regex, '█'.repeat(bannedWords[i].get('word').length));
|
censoredMessage = censoredMessage.replace(regex, '█'.repeat(bannedWords[i].get('word').length));
|
||||||
}
|
}
|
||||||
let Embed = new MessageEmbed()
|
let Embed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member.displayHexColor)
|
||||||
.setAuthor(message.author.username, message.author.displayAvatarURL())
|
.setAuthor(message.author.username, message.author.displayAvatarURL())
|
||||||
.setDescription(censoredMessage);
|
.setDescription(censoredMessage);
|
||||||
|
@ -183,7 +182,7 @@ class messageListener extends Listener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const embed = new MessageEmbed()
|
const embed = this.client.util.embed()
|
||||||
.setColor(color)
|
.setColor(color)
|
||||||
.setTitle(title)
|
.setTitle(title)
|
||||||
.setImage(image)
|
.setImage(image)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Listener } = require('discord-akairo');
|
const { Listener } = require('discord-akairo');
|
||||||
const { MessageEmbed } = require('discord.js');
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
let messageID = require('../../json/starboard.json');
|
let messageID = require('../../json/starboard.json');
|
||||||
|
|
||||||
|
@ -59,7 +58,7 @@ class MessageReactionAddListener extends Listener {
|
||||||
channel = client.channels.get(shameboardChannel['shameboard']);
|
channel = client.channels.get(shameboardChannel['shameboard']);
|
||||||
}
|
}
|
||||||
|
|
||||||
let Embed = new MessageEmbed()
|
let Embed = this.client.util.embed()
|
||||||
.setColor(reaction.message.member.displayHexColor)
|
.setColor(reaction.message.member.displayHexColor)
|
||||||
.setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL())
|
.setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL())
|
||||||
.addField('Jump to', `[message](https://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id})`, true)
|
.addField('Jump to', `[message](https://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id})`, true)
|
||||||
|
|
Loading…
Reference in a new issue