forked from cosmic-jellyfish/PeepoBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
changemymind.js
32 lines (25 loc) · 947 Bytes
/
changemymind.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* Command: $changemymind
* Author: Cake#0002
* Description: Change my mind meme with text
*/
const Discord = require('discord.js');
const { Attachment } = require("discord.js");
const Idiot = require("idiotic-api");
exports.exec = async (client, message, args, API, user) => {
client.API = new Idiot.Client("xxxxxxxxxxxxxx", { dev: true });
// Fires Error message that the command wasn't ran correctly.
if (args == '') {
return client.emit('commandUsage', message, this.help);
}
// Fires Error message that the command wasn't ran correctly.
message.channel.send('`Processing image`.')
.then(msg => {
msg.delete(5000)
})
message.channel.startTyping();
let bs = await client.API.changemymind(message.author.displayAvatarURL, args.join(' '));
await message.channel.stopTyping();
return message.channel.send({ files: [{ attachment: bs }] });
};
/* * * * */