Skip to content

Commit 29431bb

Browse files
committed
Post to DEL
1 parent b2f24c1 commit 29431bb

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/commands/utility/post.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const util = require('../../util');
2+
const config = require('../../../config.json')
3+
const Discord = require("discord.js");
4+
const DEL = require('@zerotwobot/del.js') // importing del
5+
const del = new DEL(config.DELtoken, "889197952994791434") // initializing it
6+
7+
module.exports = {
8+
name: 'post',
9+
10+
description: 'Post to DEL',
11+
12+
13+
async execute(message, args, client) {
14+
15+
if (!client.application.owner)
16+
await client.application.fetch()
17+
18+
if (client.application.owner.id !== message.author.id) {
19+
return message.reply('This command is restricted to my developers.')
20+
}
21+
22+
try {
23+
del.post(client.guilds.cache.size, 0)
24+
return message.reply(`Successfully posted ${client.guilds.cache.size} guilds to DEL.`)
25+
} catch (e) {
26+
return message.reply(`Failed to post:\n\`${e}\``)
27+
}
28+
},
29+
};

0 commit comments

Comments
 (0)