forked from cosmic-jellyfish/PeepoBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vaultboy.js
39 lines (29 loc) · 1.03 KB
/
vaultboy.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
33
34
35
36
37
38
39
/*
* Command: $vaultboy
* Author: Cake#0002
* Description: VAULT BOY. VAULT BOY. VAULT BOY.
*/
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.
let url = message.author.displayAvatarURL;
if (message.mentions.users.first()) {
url = message.mentions.users.first().displayAvatarURL;
}
message.channel.send('`Processing image`.')
.then(msg => {
msg.delete(5000)
})
message.channel.startTyping();
let bs = await client.API.vaultBoy(url);
await message.channel.stopTyping();
return message.channel.send({ files: [{ attachment: bs }] });
};
/* * * * */