-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathhastebin.js
More file actions
42 lines (40 loc) · 1.18 KB
/
hastebin.js
File metadata and controls
42 lines (40 loc) · 1.18 KB
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
40
41
42
const { Command } = require("discord.js-commando");
const oneLine = require("common-tags").oneLine;
const { MessageEmbed } = require("discord.js");
const hastebin = require("hastebin-gen");
module.exports = class HastebinCommand extends Command {
constructor(client) {
super(client, {
name: "haste",
aliases: [],
group: "misc",
memberName: "haste",
description: "Posts to Hastebin",
details: oneLine`
Posts to Hastebin
`,
examples: ["haste test"],
args: [
{
key: "haste",
prompt: "What text would you to post on hastebin?",
type: "string",
},
],
});
}
async run(message, args) {
if (message.author.bot) return;
const result = await hastebin(args.haste).catch(err => {
console.error(err);
});
const embed = new MessageEmbed()
.setAuthor(
"Posted to Hastebin",
"https://dl1.cbsistatic.com/i/2018/12/06/ba48919c-d69b-47de-bdda-e571a5d0cb68/95f55392ccf92166fe42d1fb483992f6/imgingest-3562709916302622107.png",
)
.setDescription(result)
.setColor("DARK_BLUE");
message.channel.send(embed);
}
};