Skip to content

Commit

Permalink
Post to DEL
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaSlui committed Sep 23, 2021
1 parent b2f24c1 commit 29431bb
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/commands/utility/post.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const util = require('../../util');
const config = require('../../../config.json')
const Discord = require("discord.js");
const DEL = require('@zerotwobot/del.js') // importing del
const del = new DEL(config.DELtoken, "889197952994791434") // initializing it

module.exports = {
name: 'post',

description: 'Post to DEL',


async execute(message, args, client) {

if (!client.application.owner)
await client.application.fetch()

if (client.application.owner.id !== message.author.id) {
return message.reply('This command is restricted to my developers.')
}

try {
del.post(client.guilds.cache.size, 0)
return message.reply(`Successfully posted ${client.guilds.cache.size} guilds to DEL.`)
} catch (e) {
return message.reply(`Failed to post:\n\`${e}\``)
}
},
};

0 comments on commit 29431bb

Please sign in to comment.