File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
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
+ } ;
You can’t perform that action at this time.
0 commit comments