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+ import { Interpreter } from "../../core"
2+ import { Logger } from "../../structures"
3+ import { DiscordEventHandler } from "../../structures/extended/DiscordEventHandler"
4+ import { InviteTracker } from "../../structures/trackers/InviteTracker"
5+
6+ export default new DiscordEventHandler ( {
7+ name : "clientReady" ,
8+ version : "2.4.2" ,
9+ description : "This event is fired when the bot becomes ready" ,
10+ listener : async function ( ) {
11+ const commands = this . commands . get ( "clientReady" )
12+ if ( commands . length ) {
13+ for ( const command of commands ) {
14+ Interpreter . run ( {
15+ client : this ,
16+ command,
17+ data : command . compiled . code ,
18+ obj : { } ,
19+ } )
20+ }
21+ } else {
22+ Logger . info ( `Ready on client ${ this . user . displayName } ` )
23+ }
24+
25+ if ( this . options . trackers ?. invites ) {
26+ await InviteTracker . cacheAll ( this )
27+ }
28+ } ,
29+ } )
You can’t perform that action at this time.
0 commit comments