Compare commits
No commits in common. "4a09c2ba90f369b976f4f2c88a3ed3e2395294e5" and "be8ed9e30bd733b04aff221f0616a6be08effe63" have entirely different histories.
4a09c2ba90
...
be8ed9e30b
32 changed files with 122 additions and 125 deletions
|
@ -33,7 +33,7 @@ class fakejoinCommand extends Command {
|
|||
else
|
||||
member = message.guild.members.resolve(message.author.id);
|
||||
} else {
|
||||
return message.reply('There is no join channel setup');
|
||||
return message.channel.send('There is no join channel setup');
|
||||
}
|
||||
|
||||
this.client.emit('guildMemberAdd', member);
|
||||
|
|
|
@ -33,7 +33,7 @@ class fakeleaveCommand extends Command {
|
|||
else
|
||||
member = message.guild.members.resolve(message.author.id);
|
||||
} else {
|
||||
return message.reply('There is no leave channel setup');
|
||||
return message.channel.send('There is no leave channel setup');
|
||||
}
|
||||
|
||||
this.client.emit('guildMemberRemove', member);
|
||||
|
|
|
@ -27,14 +27,14 @@ class CleverBotCommand extends Command {
|
|||
}
|
||||
|
||||
async exec(message, args) {
|
||||
let loadingmsg = await message.reply('Processing! <a:loadingmin:527579785212329984>');
|
||||
let loadingmsg = await message.channel.send('Processing! <a:loadingmin:527579785212329984>');
|
||||
if (!conversation[message.guild.id]) conversation[message.guild.id] = [];
|
||||
|
||||
if (!conversation[0]) {
|
||||
cleverbot(args.message).then(response => {
|
||||
conversation[message.guild.id].push(args.message);
|
||||
conversation[message.guild.id].push(response);
|
||||
return message.reply(response)
|
||||
return message.channel.send(response)
|
||||
.then(() => {
|
||||
loadingmsg.delete();
|
||||
});
|
||||
|
@ -43,7 +43,7 @@ class CleverBotCommand extends Command {
|
|||
cleverbot(args.message, conversation[message.guild.id]).then(response => {
|
||||
conversation[message.guild.id].push(args.message);
|
||||
conversation[message.guild.id].push(response);
|
||||
return message.reply(response)
|
||||
return message.channel.send(response)
|
||||
.then(() => {
|
||||
loadingmsg.delete();
|
||||
});
|
||||
|
|
|
@ -22,7 +22,7 @@ class dosentexistCommand extends Command {
|
|||
const dest = fs.createWriteStream('./asset/img/de.png');
|
||||
res.body.pipe(dest);
|
||||
dest.on('finish', () => {
|
||||
return message.reply({files: ['./asset/img/de.png']});
|
||||
return message.channel.send({files: ['./asset/img/de.png']});
|
||||
});
|
||||
}); }
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ class explosmCommand extends Command {
|
|||
|
||||
async exec(message) {
|
||||
extract({ uri: 'http://explosm.net/rcg' }, (err, res) => {
|
||||
return message.reply({files: [res.ogImage]});
|
||||
return message.channel.send({files: [res.ogImage]});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -69,6 +69,11 @@ class fakebotCommand extends Command {
|
|||
else
|
||||
webhook.send(args.message);
|
||||
|
||||
setTimeout(() => {
|
||||
webhook.delete({
|
||||
reason: `Fakebot/user command triggered by: ${message.author.username}`
|
||||
});
|
||||
}, 3000);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -38,14 +38,14 @@ class RedditCommand extends Command {
|
|||
}).then((response) => {
|
||||
console.log(response);
|
||||
if (response.error == 404)
|
||||
return message.reply('Not a valid subreddit');
|
||||
return message.channel.send('Not a valid subreddit');
|
||||
|
||||
if (response.data.dist == 0)
|
||||
return message.reply('Not a valid subreddit');
|
||||
return message.channel.send('Not a valid subreddit');
|
||||
|
||||
let i = Math.floor((Math.random() * response.data.children.length));
|
||||
if (response.data.children[i].data.over_18 == true && !message.channel.nsfw)
|
||||
return message.reply('No nsfw');
|
||||
return message.channel.send('No nsfw');
|
||||
const redditEmbed = this.client.util.embed()
|
||||
.setColor(message.member ? message.member.displayHexColor : 'NAVY')
|
||||
.setTitle(response.data.children[i].data.title)
|
||||
|
@ -53,8 +53,8 @@ class RedditCommand extends Command {
|
|||
.setURL('https://reddit.com' + response.data.children[i].data.permalink)
|
||||
.setFooter(`/r/${response.data.children[i].data.subreddit} | ⬆ ${response.data.children[i].data.ups} 🗨 ${response.data.children[i].data.num_comments}`);
|
||||
|
||||
message.reply(redditEmbed);
|
||||
message.reply(response.data.children[i].data.url);
|
||||
message.channel.send(redditEmbed);
|
||||
message.channel.send(response.data.children[i].data.url);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ class spbCommand extends Command {
|
|||
|
||||
async exec(message, args) {
|
||||
if (!args.link || !args.link.href.includes('shitpostbot.com/template/')) {
|
||||
return message.reply('Need a Shitpostbot 5000 template link!\nYou can find them here! <https://www.shitpostbot.com/gallery/templates>');
|
||||
return message.channel.send('Need a Shitpostbot 5000 template link!\nYou can find them here! <https://www.shitpostbot.com/gallery/templates>');
|
||||
}
|
||||
|
||||
let link = args.link.href.replace('template', 'preview');
|
||||
|
@ -38,7 +38,7 @@ class spbCommand extends Command {
|
|||
const dest = fs.createWriteStream(`${os.tmpdir()}/${message.id}.jpg`);
|
||||
res.body.pipe(dest);
|
||||
dest.on('finish', () => {
|
||||
return message.reply({files: [`${os.tmpdir()}/${message.id}.jpg`]});
|
||||
return message.channel.send({files: [`${os.tmpdir()}/${message.id}.jpg`]});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ class ytpCommand extends Command {
|
|||
}
|
||||
});
|
||||
|
||||
return message.reply(`There is currently ${mp4.length} videos, you can add yours by doing \`\`${this.client.commandHandler.prefix[0]}ytp --add (link or attachment)\`\``);
|
||||
return message.channel.send(`There is currently ${mp4.length} videos, you can add yours by doing \`\`${this.client.commandHandler.prefix[0]}ytp --add (link or attachment)\`\``);
|
||||
}
|
||||
|
||||
if (args.listproxy) {
|
||||
|
@ -161,7 +161,7 @@ class ytpCommand extends Command {
|
|||
.setDescription(proxys.join('\n'))
|
||||
.setFooter('You can help me get more proxy by either donating to me or providing a proxy for me');
|
||||
|
||||
return message.reply(Embed);
|
||||
return message.channel.send(Embed);
|
||||
}
|
||||
|
||||
if (args.add) {
|
||||
|
@ -169,7 +169,7 @@ class ytpCommand extends Command {
|
|||
const blacklist = await ytpblacklist.findOne({where: {userID:message.author.id}});
|
||||
|
||||
if (blacklist) {
|
||||
return message.reply(`You have been blacklisted for the following reasons: \`${blacklist.get('reason')}\` be less naughty next time.`);
|
||||
return message.channel.send(`You have been blacklisted for the following reasons: \`${blacklist.get('reason')}\` be less naughty next time.`);
|
||||
}
|
||||
*/
|
||||
|
||||
|
@ -178,7 +178,7 @@ class ytpCommand extends Command {
|
|||
if (!proxy[args.proxy]) args.proxy = 0;
|
||||
}
|
||||
|
||||
let loadingmsg = await message.reply('Downloading <a:loadingmin:527579785212329984>');
|
||||
let loadingmsg = await message.channel.send('Downloading <a:loadingmin:527579785212329984>');
|
||||
let url;
|
||||
|
||||
if (args.link)
|
||||
|
@ -204,15 +204,15 @@ class ytpCommand extends Command {
|
|||
args.proxyAuto = true;
|
||||
}
|
||||
|
||||
if (!proxy[args.proxy]) return message.reply('`HTTP Error 429: Too Many Requests.`\nThe website you tried to download from probably has the bot blocked along with its proxy');
|
||||
if (!proxy[args.proxy]) return message.channel.send('`HTTP Error 429: Too Many Requests.`\nThe website you tried to download from probably has the bot blocked along with its proxy');
|
||||
|
||||
loadingmsg.delete();
|
||||
return this.client.commandHandler.runCommand(message, this.client.commandHandler.findCommand('ytp'), args);
|
||||
}
|
||||
|
||||
if (err.includes('Error: status code 403')) return message.reply('`HTTP Error 403: Forbidden.`\nThe video you tried to download is not publicly available therefor the bot can\'t download it.');
|
||||
if (err.includes('Error: status code 403')) return message.channel.send('`HTTP Error 403: Forbidden.`\nThe video you tried to download is not publicly available therefor the bot can\'t download it.');
|
||||
|
||||
return message.reply(err, { code: true });
|
||||
return message.channel.send(err, { code: true });
|
||||
|
||||
})
|
||||
.on('end', async output => {
|
||||
|
@ -280,12 +280,12 @@ class ytpCommand extends Command {
|
|||
});
|
||||
} else {
|
||||
loadingmsg.delete();
|
||||
return message.reply('You need a valid video link!');
|
||||
return message.channel.send('You need a valid video link!');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!message.channel.nsfw && !args.force) return message.reply(`Please execute this command in an NSFW channel ( Content might not be NSFW but since the video are user submitted better safe than sorry ) OR do \`\`${this.client.commandHandler.prefix[0]}ytp --force\`\` to make the command work outside of nsfw channel BE AWARE THAT IT WON'T CHANGE THE FINAL RESULT SO NSFW CAN STILL HAPPEN`);
|
||||
if (!message.channel.nsfw && !args.force) return message.channel.send(`Please execute this command in an NSFW channel ( Content might not be NSFW but since the video are user submitted better safe than sorry ) OR do \`\`${this.client.commandHandler.prefix[0]}ytp --force\`\` to make the command work outside of nsfw channel BE AWARE THAT IT WON'T CHANGE THE FINAL RESULT SO NSFW CAN STILL HAPPEN`);
|
||||
|
||||
// Read userVid folder and select random vid and only take .mp4
|
||||
let mp4 = [];
|
||||
|
@ -308,7 +308,7 @@ class ytpCommand extends Command {
|
|||
}
|
||||
}
|
||||
|
||||
let loadingmsg = await message.reply(`Processing, this can take a ***long*** time, i'll ping you when i finished <a:loadingmin:527579785212329984>\nSome info: There are currently ${mp4.length} videos, you can add yours by doing \`\`${this.client.commandHandler.prefix[0]}ytp --add (link or attachment)\`\`\nLike ytp? Why not check out https://ytp.namejeff.xyz/`);
|
||||
let loadingmsg = await message.channel.send(`Processing, this can take a ***long*** time, i'll ping you when i finished <a:loadingmin:527579785212329984>\nSome info: There are currently ${mp4.length} videos, you can add yours by doing \`\`${this.client.commandHandler.prefix[0]}ytp --add (link or attachment). Thanks for contributing!\`\``);
|
||||
|
||||
|
||||
let options = {
|
||||
|
@ -353,7 +353,7 @@ class ytpCommand extends Command {
|
|||
return message.reply('Here is your YTP! Remember, it might contain nsfw, so be careful!', {files: [`${os.tmpdir()}/${message.id}_YTP.mp4`]})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
return message.reply('Whoops, look like the vid might be too big for discord, my bad, please try again');
|
||||
return message.channel.send('Whoops, look like the vid might be too big for discord, my bad, please try again');
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
|
@ -368,7 +368,7 @@ class ytpCommand extends Command {
|
|||
return message.reply({files: [Math.random() < 0.5 ? './asset/ytp/error1.mp4' : './asset/ytp/error2.mp4']})
|
||||
.catch(err => { // In case it can't send the video for some reason
|
||||
console.error(err);
|
||||
return message.reply('Oh no, an error has occurred! please try again. If this happens alot, you should report this to the developers.');
|
||||
return message.channel.send('Oh no, an error has occurred! please try again. If this happens alot, you should report this to the developers.');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@ class AdviceCommand extends Command {
|
|||
}).then((response) => {
|
||||
const adviceEmbed = this.client.util.embed()
|
||||
.setColor(message.member ? message.member.displayHexColor : 'NAVY')
|
||||
.setTitle(response.slip.id)
|
||||
.setTitle(response.slip.slip_id)
|
||||
.setDescription(response.slip.advice);
|
||||
|
||||
|
||||
message.reply(adviceEmbed);
|
||||
message.channel.send(adviceEmbed);
|
||||
|
||||
});
|
||||
}
|
||||
|
|
|
@ -30,7 +30,8 @@ class ClapCommand extends Command {
|
|||
args.text = rand.random(args.text, message);
|
||||
|
||||
let clap = args.text.replace(/ /g, ' 👏 ');
|
||||
message.reply(`${clap} 👏`);
|
||||
message.delete();
|
||||
message.channel.send(`${clap} 👏`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class randomizerCommand extends Command {
|
|||
async exec(message, args) {
|
||||
let words = args.text.split(' ');
|
||||
|
||||
return message.reply(words[Math.floor((Math.random() * words.length))]);
|
||||
return message.channel.send(words[Math.floor((Math.random() * words.length))]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class tweetCommand extends Command {
|
|||
|
||||
async exec(message, args) {
|
||||
let Attachment = (message.attachments).array();
|
||||
if (!Attachment[0] && !args.text) return message.reply('You need to input something for me to tweet!');
|
||||
if (!Attachment[0] && !args.text) return message.channel.send('You need to input something for me to tweet!');
|
||||
|
||||
let date = new Date();
|
||||
// see if user is not banned
|
||||
|
@ -42,33 +42,24 @@ class tweetCommand extends Command {
|
|||
const blacklist = await TwitterBlacklist.findOne({where: {userID:message.author.id}});
|
||||
|
||||
if (blacklist) {
|
||||
return message.reply(`You have been blacklisted for the following reasons: \`${blacklist.get('reason')}\` be less naughty next time.`);
|
||||
return message.channel.send(`You have been blacklisted for the following reasons: \`${blacklist.get('reason')}\` be less naughty next time.`);
|
||||
}
|
||||
*/
|
||||
// If account is less than 6 months old don't accept the tweet ( alt prevention )
|
||||
if (message.author.createdAt > date.setMonth(date.getMonth() - 6)) {
|
||||
return message.reply('Your account is too new to be able to use this command!');
|
||||
return message.channel.send('Your account is too new to be able to use this command!');
|
||||
}
|
||||
|
||||
// If account is less than 1 year old don't accept attachment
|
||||
if (Attachment[0] && message.author.createdAt > date.setFullYear(date.getFullYear() - 1 )) {
|
||||
return message.reply('Your account need to be 1 year or older to be able to send attachment!');
|
||||
return message.channel.send('Your account need to be 1 year or older to be able to send attachment!');
|
||||
}
|
||||
|
||||
// remove zero width space and use the dictionary thingy
|
||||
let text = '';
|
||||
if (args.text) {
|
||||
text = args.text.replace('', '');
|
||||
|
||||
text = rand.random(text, message);
|
||||
}
|
||||
|
||||
if (text) {
|
||||
// Detect banned word (Blacklist the user directly)
|
||||
if (wordToCensor.includes(text) || wordToCensor.includes(text.substr(0, text.length - 1)) || wordToCensor.includes(text.substr(1, text.length))) {
|
||||
if (wordToCensor.includes(args.text)) {
|
||||
const body = {type:'tweet', uid: message.author.id, reason: 'Automatic ban from banned word.'};
|
||||
Blacklists.create(body);
|
||||
|
||||
/*
|
||||
const body = {userID: message.author.id, reason: };
|
||||
TwitterBlacklist.create(body);
|
||||
|
@ -91,6 +82,27 @@ class tweetCommand extends Command {
|
|||
access_token_secret: twiTokenSecret
|
||||
});
|
||||
|
||||
/*
|
||||
// Censor words
|
||||
let censor = reload('../../json/censor.json');
|
||||
let uncensor = reload('../../json/uncensor.json');
|
||||
filter.addWords(...censor);
|
||||
filter.removeWords(...uncensor);
|
||||
*/
|
||||
|
||||
// remove zero width space
|
||||
let text = '';
|
||||
if (args.text) {
|
||||
text = args.text.replace('', '');
|
||||
|
||||
/*
|
||||
//Filter out swear word
|
||||
text = filter.clean(text);
|
||||
*/
|
||||
|
||||
text = rand.random(text, message);
|
||||
}
|
||||
|
||||
try {
|
||||
// Make sure there is an attachment and if its an image
|
||||
if (Attachment[0]) {
|
||||
|
@ -104,9 +116,9 @@ class tweetCommand extends Command {
|
|||
let fileSize = file.size / 1000000.0;
|
||||
|
||||
if ((Attachment[0].name.endsWith('.jpg') || Attachment[0].name.endsWith('.png')) && fileSize > 5) {
|
||||
return message.reply('Images can\'t be larger than 5 MB!');
|
||||
return message.channel.send('Images can\'t be larger than 5 MB!');
|
||||
} else if (Attachment[0].name.endsWith('.gif') && fileSize > 15) {
|
||||
return message.reply('Gifs can\'t be larger than 15 MB!');
|
||||
return message.channel.send('Gifs can\'t be larger than 15 MB!');
|
||||
}
|
||||
|
||||
let b64Image = fs.readFileSync(`${os.tmpdir()}/${Attachment[0].name}`, { encoding: 'base64'});
|
||||
|
@ -114,7 +126,7 @@ class tweetCommand extends Command {
|
|||
if (err) {
|
||||
console.log('OH NO AN ERROR!!!!!!!');
|
||||
console.error(err);
|
||||
return message.reply('OH NO!!! AN ERROR HAS occurred!!! please hold on while i find what\'s causing this issue! ');
|
||||
return message.channel.send('OH NO!!! AN ERROR HAS occurred!!! please hold on while i find what\'s causing this issue! ');
|
||||
} else {
|
||||
Tweet(data);
|
||||
}
|
||||
|
@ -122,14 +134,14 @@ class tweetCommand extends Command {
|
|||
});
|
||||
});
|
||||
} else {
|
||||
return message.reply('File type not supported, you can only send jpg/png/gif');
|
||||
return message.channel.send('File type not supported, you can only send jpg/png/gif');
|
||||
}
|
||||
} else {
|
||||
Tweet();
|
||||
}
|
||||
} catch(err) {
|
||||
console.error(err);
|
||||
return message.reply('Oh no, an error has occurred :(');
|
||||
return message.channel.send('Oh no, an error has occurred :(');
|
||||
}
|
||||
|
||||
function Tweet(data) {
|
||||
|
@ -150,13 +162,13 @@ class tweetCommand extends Command {
|
|||
|
||||
T.post('statuses/update', options, function (err, response) {
|
||||
if (err) {
|
||||
if (err.code == 88) return message.reply(err.message); // Rate limit exceeded
|
||||
if (err.code == 186) return message.reply(`${err.message} Your message was ${text.length} characters, you need to remove ${text.length - 280} characters (This count may be inaccurate if your message contained link)`); // Tweet needs to be a bit shorter.
|
||||
if (err.code == 187) return message.reply(err.message); // Status is a duplicate.
|
||||
if (err.code == 326) return message.reply(err.message); // To protect our users from spam and other malicious activity, this account is temporarily locked.
|
||||
if (err.code == 88) return message.channel.send(err.message); // Rate limit exceeded
|
||||
if (err.code == 186) return message.channel.send(`${err.message} Your message was ${text.length} characters, you need to remove ${text.length - 280} characters (This count may be inaccurate if your message contained link)`); // Tweet needs to be a bit shorter.
|
||||
if (err.code == 187) return message.channel.send(err.message); // Status is a duplicate.
|
||||
if (err.code == 326) return message.channel.send(err.message); // To protect our users from spam and other malicious activity, this account is temporarily locked.
|
||||
console.error('OH NO!!!!');
|
||||
console.error(err);
|
||||
return message.reply('OH NO!!! AN ERROR HAS occurred!!! please hold on while i find what\'s causing this issue! ');
|
||||
return message.channel.send('OH NO!!! AN ERROR HAS occurred!!! please hold on while i find what\'s causing this issue! ');
|
||||
}
|
||||
|
||||
const tweetid = response.id_str;
|
||||
|
@ -188,7 +200,7 @@ class tweetCommand extends Command {
|
|||
|
||||
channel = client.channels.resolve(twiChannel);
|
||||
channel.send({embed: Embed});
|
||||
return message.reply(`Go see ur epic tweet ${TweetLink}`);
|
||||
return message.channel.send(`Go see ur epic tweet ${TweetLink}`);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@ class OwnedCommand extends Command {
|
|||
if (args.member) {
|
||||
|
||||
if (args.member.id == this.client.user.id) {
|
||||
return message.reply('You really thought you could own me?, pathetic...');
|
||||
return message.channel.send('You really thought you could own me?, pathetic...');
|
||||
} else if (args.member.id == this.client.ownerID) {
|
||||
return message.reply('You really thought you could own him?, pathetic...');
|
||||
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;
|
||||
}
|
||||
|
@ -41,9 +41,9 @@ class OwnedCommand extends Command {
|
|||
return message.reply(ownedMessage);
|
||||
}
|
||||
|
||||
return message.send(`${owned}, ${ownedMessage}`);
|
||||
return message.channel.send(`${owned}, ${ownedMessage}`);
|
||||
} else {
|
||||
return message.send(ownedMessage);
|
||||
return message.channel.send(ownedMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class premiumCommand extends Command {
|
|||
}
|
||||
|
||||
async exec(message) {
|
||||
return message.reply('EPIC TF2 FEATURE HERE !!!!!!111111 YOU CAN FLY AND CHEAT !!!!!!!!!!!!!!!!! ALSO PREMIUM SONG AND ANNOY EVERYONE AND FLEX ON EM HATERS WITH CUSTOM SKIN!!!!');
|
||||
return message.channel.send('EPIC TF2 FEATURE HERE !!!!!!111111 YOU CAN FLY AND CHEAT !!!!!!!!!!!!!!!!! ALSO PREMIUM SONG AND ANNOY EVERYONE AND FLEX ON EM HATERS WITH CUSTOM SKIN!!!!');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ class sexCommand extends Command {
|
|||
}
|
||||
|
||||
async exec(message) {
|
||||
return message.reply('69\nHaha lol Le sex numbers xDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD');
|
||||
return message.channel.send('69\nHaha lol Le sex numbers xDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,12 +22,12 @@ class unownedCommand extends Command {
|
|||
|
||||
async exec(message, args) {
|
||||
if (args.member) {
|
||||
return message.reply('You can\'t do that! that\'s illegal!');
|
||||
return message.channel.send('You can\'t do that! that\'s illegal!');
|
||||
}
|
||||
if (message.author.id == '267065637183029248') {
|
||||
return message.reply('You have been sucessfully unowned');
|
||||
return message.channel.send('You have been sucessfully unowned');
|
||||
}
|
||||
return message.reply('You can\'t unown what has already been owned <:classictroll:488559136494321703>');
|
||||
return message.channel.send('You can\'t unown what has already been owned <:classictroll:488559136494321703>');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const { Command } = require('discord-akairo');
|
||||
const attachment = require('../../utils/attachment');
|
||||
const gm = require('gm').subClass({imageMagick: true});
|
||||
const os = require('os');
|
||||
const fetch = require('node-fetch');
|
||||
|
@ -61,30 +60,22 @@ class posterCommand extends Command {
|
|||
async exec(message, args) {
|
||||
let options = args.message.trim().split('|');
|
||||
|
||||
let url;
|
||||
|
||||
console.log(args.link);
|
||||
|
||||
if (args.link !== '^')
|
||||
url = new URL(args.link);
|
||||
else
|
||||
url = await attachment(message);
|
||||
|
||||
console.log(url);
|
||||
|
||||
if (options[0] == undefined)
|
||||
options[0] = '';
|
||||
else if (options[1] == undefined)
|
||||
options[1] = '';
|
||||
|
||||
let url = args.link;
|
||||
|
||||
|
||||
if (!url) {
|
||||
return message.reply('You need an image to use this command!');
|
||||
return message.channel.send('You need an image to use this command!');
|
||||
}
|
||||
|
||||
let loadingmsg = await message.reply('Processing <a:loadingmin:527579785212329984>');
|
||||
let loadingmsg = await message.channel.send('Processing <a:loadingmin:527579785212329984>');
|
||||
|
||||
// Create new graphicsmagick instance
|
||||
fetch(url.href)
|
||||
fetch(url)
|
||||
.then(res => {
|
||||
const dest = fs.createWriteStream(`${os.tmpdir()}/${message.id}`);
|
||||
res.body.pipe(dest);
|
||||
|
@ -102,7 +93,7 @@ class posterCommand extends Command {
|
|||
img.format(function(err, format) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
return message.reply('An error has occurred, is it an image?');
|
||||
return message.channel.send('An error has occurred, is it an image?');
|
||||
}
|
||||
let output1 = `${os.tmpdir()}/poster${message.author.id}.${format.toLowerCase()}`;
|
||||
let output2 = `${os.tmpdir()}/poster${message.id}.${format.toLowerCase()}`;
|
||||
|
@ -136,7 +127,7 @@ class posterCommand extends Command {
|
|||
.write(output1, function(err) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
return message.reply('An error just occurred! is it a static image?');
|
||||
return message.channel.send('An error just occurred! is it a static image?');
|
||||
}
|
||||
// Chop the top part of the image
|
||||
let img2 = gm(output1);
|
||||
|
@ -145,7 +136,7 @@ class posterCommand extends Command {
|
|||
loadingmsg.delete();
|
||||
if (err) {
|
||||
console.error(err);
|
||||
return message.reply('An error just occurred! is it a static image?');
|
||||
return message.channel.send('An error just occurred! is it a static image?');
|
||||
}
|
||||
message.delete();
|
||||
return message.channel.send(`Made by ${message.author.username}`,{files: [output2]})
|
||||
|
@ -161,7 +152,7 @@ class posterCommand extends Command {
|
|||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
return message.reply(`Please input a correct link \`${err}\``);
|
||||
return message.channel.send(`Please input a correct link \`${err}\``);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,34 +28,34 @@ class rpsCommand extends Command {
|
|||
switch (playerHand) {
|
||||
case 'rock':
|
||||
if (pcHand==1) {
|
||||
message.reply('You both chose rock!');
|
||||
message.channel.send('You both chose rock!');
|
||||
} else if (pcHand==2) {
|
||||
message.reply('The bot chose paper, you lose!');
|
||||
message.channel.send('The bot chose paper, you lose!');
|
||||
} else {
|
||||
message.reply('The bot chose scissors, you win!');
|
||||
message.channel.send('The bot chose scissors, you win!');
|
||||
}
|
||||
break;
|
||||
case 'paper':
|
||||
if (pcHand==1) {
|
||||
message.reply('You both chose paper!');
|
||||
message.channel.send('You both chose paper!');
|
||||
} else if (pcHand==2) {
|
||||
message.reply('The bot chose scissors, you lose!');
|
||||
message.channel.send('The bot chose scissors, you lose!');
|
||||
} else {
|
||||
message.reply('The bot chose rock, you win!');
|
||||
message.channel.send('The bot chose rock, you win!');
|
||||
}
|
||||
break;
|
||||
case 'scissors':
|
||||
if (pcHand==1) {
|
||||
message.reply('You both chose scissors!');
|
||||
message.channel.send('You both chose scissors!');
|
||||
} else if (pcHand==2) {
|
||||
message.reply('The bot chose rock, you lose!');
|
||||
message.channel.send('The bot chose rock, you lose!');
|
||||
} else {
|
||||
message.reply('The bot chose paper, you win!');
|
||||
message.channel.send('The bot chose paper, you win!');
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
message.reply(`You entered ${playerHand} which is an incorrect choice. Try again with rock, paper or scissors`);
|
||||
message.channel.send(`You entered ${playerHand} which is an incorrect choice.`);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class aboutCommand extends Command {
|
|||
.setThumbnail('https://its.gamingti.me/ZiRe.png')
|
||||
.setFooter(`Original bot made by ${this.client.users.resolve('267065637183029248').tag} (267065637183029248)`); // Please this line
|
||||
|
||||
message.reply(aboutEmbed);
|
||||
message.channel.send(aboutEmbed);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class AvatarCommand extends Command {
|
|||
avatarEmbed.setDescription(`[png](${message.author.displayAvatarURL({ format: 'png', size: 2048 })}) | [jpeg](${message.author.displayAvatarURL({ format: 'jpg', size: 2048 })}) | [webp](${message.author.displayAvatarURL({ format: 'webp', size: 2048 })})`);
|
||||
avatarEmbed.setImage(message.author.displayAvatarURL({ format: 'png', size: 2048 }));
|
||||
}
|
||||
return message.reply({embed: avatarEmbed});
|
||||
return message.channel.send({embed: avatarEmbed});
|
||||
} else {
|
||||
let format = args.user.displayAvatarURL({ dynamic: true }).substr(args.user.displayAvatarURL({ dynamic: true }).length - 3);
|
||||
console.log(format);
|
||||
|
@ -51,7 +51,7 @@ class AvatarCommand extends Command {
|
|||
avatarEmbed.setDescription(`[png](${args.user.displayAvatarURL({ format: 'png', size: 2048 })}) | [jpeg](${args.user.displayAvatarURL({ format: 'jpg', size: 2048 })}) | [webp](${args.user.displayAvatarURL({ format: 'webp', size: 2048 })})`);
|
||||
avatarEmbed.setImage(args.user.displayAvatarURL({ format: 'png', size: 2048 }));
|
||||
}
|
||||
return message.reply({embed: avatarEmbed});
|
||||
return message.channel.send({embed: avatarEmbed});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ class donateCommand extends Command {
|
|||
}
|
||||
|
||||
async exec(message) {
|
||||
if (donations === undefined) return message.reply('No donations has been setup on that bot.');
|
||||
if (donations === undefined) return message.channel.send('No donations has been setup on that bot.');
|
||||
|
||||
let desc = '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.';
|
||||
|
||||
|
@ -29,7 +29,7 @@ class donateCommand extends Command {
|
|||
.setTitle('Donation link')
|
||||
.setDescription(desc);
|
||||
|
||||
return message.reply(Embed);
|
||||
return message.channel.send(Embed);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class donatorCommand extends Command {
|
|||
donatorMessage += 'No one :(';
|
||||
}
|
||||
|
||||
return message.reply(donatorMessage);
|
||||
return message.channel.send(donatorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,17 +53,6 @@ class DownloadCommand extends Command {
|
|||
}
|
||||
|
||||
async exec(message, args) {
|
||||
if (args.link === null) {
|
||||
let urlRE= 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]+)?([^ ])+');
|
||||
await message.channel.messages.fetch({ limit: 10 }).then(messages => {
|
||||
messages.map(m => {
|
||||
if (m.content.match(urlRE)) {
|
||||
args.link = new URL(m.content.match(urlRE)[0]);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (!args.link) return message.channel.send('Please try again with a valid URL.');
|
||||
|
||||
if (args.listproxy) {
|
||||
|
|
|
@ -47,7 +47,7 @@ class FeedbackCommand extends Command {
|
|||
// Don't let new account use this command to prevent spam, if they have an UUID its fine to skip it
|
||||
let date = new Date();
|
||||
if (message.author.createdAt > date.setDate(date.getDate() - 7)) {
|
||||
return message.reply('Your account is too new to be able to use this command!');
|
||||
return message.channel.send('Your account is too new to be able to use this command!');
|
||||
}
|
||||
|
||||
const channel = this.client.channels.resolve(feedbackChannel);
|
||||
|
@ -58,7 +58,7 @@ class FeedbackCommand extends Command {
|
|||
|
||||
channel.send({embed: Embed});
|
||||
|
||||
message.reply('Your feedback has been sent! Don\'t forget to have dm open if you want to get an answer from the dev!');
|
||||
message.channel.send('Your feedback has been sent! Don\'t forget to have dm open if you want to get an answer from the dev!');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class ServerCommand extends Command {
|
|||
if (logStats) addEmbed.addField('Logging', 'On ✅');
|
||||
else addEmbed.addField('Logging', 'Off ❌');
|
||||
|
||||
message.reply({ embed: addEmbed });
|
||||
message.channel.send({ embed: addEmbed });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class serverIconCommand extends Command {
|
|||
serverEmbed.setDescription(`[png](${message.guild.iconURL({ format: 'png', size: 2048 })}) | [jpeg](${message.guild.iconURL({ format: 'jpg', size: 2048 })}) | [webp](${message.guild.iconURL({ format: 'webp', size: 2048 })})`);
|
||||
serverEmbed.setImage(message.guild.iconURL({ format: 'png', size: 2048 }));
|
||||
}
|
||||
return message.reply({embed: serverEmbed});
|
||||
return message.channel.send({embed: serverEmbed});
|
||||
} else {
|
||||
let format = this.client.guilds.find(guild => guild.id == args.serverid).iconURL().substr(this.client.guilds.find(guild => guild.id == args.serverid).iconURL().length - 3);
|
||||
if (format == 'gif') {
|
||||
|
@ -50,7 +50,7 @@ class serverIconCommand extends Command {
|
|||
serverEmbed.setDescription(`[png](${this.client.guilds.find(guild => guild.id == args.serverid).iconURL({ format: 'png', size: 2048 })}) | [jpeg](${this.client.guilds.find(guild => guild.id == args.serverid).iconURL({ format: 'jpg', size: 2048 })}) | [webp](${this.client.guilds.find(guild => guild.id == args.serverid).iconURL({ format: 'webp', size: 2048 })})`);
|
||||
serverEmbed.setImage(this.client.guilds.find(guild => guild.id == args.serverid).iconURL({ format: 'png', size: 2048 }));
|
||||
}
|
||||
return message.reply({embed: serverEmbed});
|
||||
return message.channel.send({embed: serverEmbed});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ class StatsCommand extends Command {
|
|||
.addField('Discord-Akairo version', akairoVersion, true)
|
||||
.setTimestamp();
|
||||
|
||||
return message.reply(statsEmbed);
|
||||
return message.channel.send(statsEmbed);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class UpdootCommand extends Command {
|
|||
.setTimestamp()
|
||||
.setFooter('Thanks for the updoots', this.client.user.avatarURL);
|
||||
|
||||
message.reply({ embed: upDoot });
|
||||
message.channel.send({ embed: upDoot });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class userInfoCommand extends Command {
|
|||
user = args.user;
|
||||
}
|
||||
|
||||
let member = await message.guild.members.fetch(user);
|
||||
let member = message.guild.member(user);
|
||||
const Embed = this.client.util.embed()
|
||||
.setColor(member ? member.displayHexColor : 'NAVY')
|
||||
.setAuthor(`${user.tag} (${user.id})`, user.displayAvatarURL())
|
||||
|
@ -69,7 +69,7 @@ class userInfoCommand extends Command {
|
|||
if (member.roles) Embed.addField('Roles', `${member.roles.cache.array().join(', ')}`);
|
||||
}
|
||||
|
||||
return message.reply({ embed: Embed });
|
||||
return message.channel.send({ embed: Embed });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ class wallpaperCommand extends Command {
|
|||
async exec(message, args) {
|
||||
let mkt = args.region;
|
||||
if (!args.region) mkt = 'en-US';
|
||||
if (!['zh-CN', 'en-US', 'ja-JP', 'en-AU', 'en-UK', 'de-DE', 'en-NZ', 'en-CA'].includes(mkt)) return message.reply('Please choose a valid region settings: zh-CN, en-US, ja-JP, en-AU, en-UK, de-DE, en-NZ, en-CA');
|
||||
if (!['zh-CN', 'en-US', 'ja-JP', 'en-AU', 'en-UK', 'de-DE', 'en-NZ', 'en-CA'].includes(mkt)) return message.channel.send('Please choose a valid region settings: zh-CN, en-US, ja-JP, en-AU, en-UK, de-DE, en-NZ, en-CA');
|
||||
fetch(`https://bing.biturl.top/?mkt=${mkt}`)
|
||||
.then(res => {
|
||||
return res.json();
|
||||
|
@ -38,7 +38,7 @@ class wallpaperCommand extends Command {
|
|||
.setDescription(`[1366](https://bing.biturl.top/?resolution=1366&format=image&mkt=${mkt}) | [1920](https://bing.biturl.top/?resolution=1920&format=image&mkt=${mkt})`)
|
||||
.setImage(res.url);
|
||||
|
||||
return message.reply(wallpaperEmbed);
|
||||
return message.channel.send(wallpaperEmbed);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@ class messageListener extends Listener {
|
|||
}
|
||||
|
||||
async exec(message) {
|
||||
if (message.author.bot) return;
|
||||
|
||||
const blacklist = await userBlacklist.findOne({where: {userID:message.author.id}});
|
||||
|
||||
if (blacklist) return;
|
||||
|
@ -36,6 +34,7 @@ class messageListener extends Listener {
|
|||
|
||||
await message.guild.members.fetch();
|
||||
|
||||
if (message.author.bot) return;
|
||||
|
||||
/* Banned words section
|
||||
*
|
||||
|
@ -88,7 +87,7 @@ class messageListener extends Listener {
|
|||
if (message.guild) {
|
||||
const autoresponseStat = await autoResponseStat.findOne({where: {serverID: message.guild.id, stat: 'enable'}});
|
||||
if (autoresponseStat) {
|
||||
// Infinite haha very yes
|
||||
// Infinit haha very yes
|
||||
if (message.content.toLowerCase().startsWith('haha very') && message.content.toLowerCase().endsWith('yes')) {
|
||||
let yes = message.content.toLowerCase().replace('haha', '');
|
||||
yes = yes.replace('yes', '');
|
||||
|
|
Loading…
Reference in a new issue