Skip to content

Commit

Permalink
Hopefully prevent redundant messages
Browse files Browse the repository at this point in the history
See discordjs/discord.js#10301. The nonce
should allow Discord to deduplicate the messages.
  • Loading branch information
AdamLearns committed Jan 9, 2025
1 parent 94d42ec commit fba4ea8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/bots/src/discord/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ function ensureEnvVars() {
export async function init() {
ensureEnvVars()

const client = new Client({ intents: [GatewayIntentBits.Guilds] })
const client = new Client({
intents: [GatewayIntentBits.Guilds],
enforceNonce: true,
})
const clientWithCommands = client as ClientWithCommands

clientWithCommands.Commands = await readAllCommands()
Expand Down

0 comments on commit fba4ea8

Please sign in to comment.