Skip to content

Commit db1225c

Browse files
committed
minor improvement
1 parent 2d65dd3 commit db1225c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

commands/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ export default async function Init(bot: Client) {
1515
// optional: true,
1616
// })
1717

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) {
1922
await RegisterCommandsInAGuild(guild)
2023
}
2124

@@ -31,6 +34,8 @@ export default async function Init(bot: Client) {
3134
await interaction.reply(`Something went wrong. Please contact our support.`)
3235
}
3336
})
37+
38+
console.log('Commands registered.')
3439
}
3540

3641
export async function RegisterCommandsInAGuild(guild: Guild) {

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ export default async function main() {
6868
bot.on('ready', async () => {
6969
console.log(`Logged in as ${bot.user!.tag}!`)
7070
let totalAudience = 0
71-
const guilds = await bot.guilds.fetch({ limit: 1000 })
71+
const guilds = await bot.guilds.fetch({ limit: 200 })
7272

73-
// await InitCommands(bot)
73+
await InitCommands(bot)
7474

7575
for (const guild of bot.guilds.cache.values()) {
7676
const defaultChannel = GetDefaultChannel(guild)

0 commit comments

Comments
 (0)