File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ export default async function Init(bot: Client) {
15
15
// optional: true,
16
16
// })
17
17
18
- for ( const guild of bot . guilds . cache . values ( ) ) {
18
+ const guilds = bot . guilds . cache . values ( )
19
+ console . log ( `Registering commands in guilds...` )
20
+
21
+ for ( const guild of guilds ) {
19
22
await RegisterCommandsInAGuild ( guild )
20
23
}
21
24
@@ -31,6 +34,8 @@ export default async function Init(bot: Client) {
31
34
await interaction . reply ( `Something went wrong. Please contact our support.` )
32
35
}
33
36
} )
37
+
38
+ console . log ( 'Commands registered.' )
34
39
}
35
40
36
41
export async function RegisterCommandsInAGuild ( guild : Guild ) {
Original file line number Diff line number Diff line change @@ -68,9 +68,9 @@ export default async function main() {
68
68
bot . on ( 'ready' , async ( ) => {
69
69
console . log ( `Logged in as ${ bot . user ! . tag } !` )
70
70
let totalAudience = 0
71
- const guilds = await bot . guilds . fetch ( { limit : 1000 } )
71
+ const guilds = await bot . guilds . fetch ( { limit : 200 } )
72
72
73
- // await InitCommands(bot)
73
+ await InitCommands ( bot )
74
74
75
75
for ( const guild of bot . guilds . cache . values ( ) ) {
76
76
const defaultChannel = GetDefaultChannel ( guild )
You can’t perform that action at this time.
0 commit comments