mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
add interaction timeouts
This commit is contained in:
parent
852e4d58c6
commit
5b98c593af
@ -47,6 +47,10 @@ export const GUILD_MEMBER_REMOVE: RawHandler<DiscordGuildMemberRemove> = (sessio
|
||||
|
||||
export const INTERACTION_CREATE: RawHandler<DiscordInteraction> = (session, _shardId, interaction) => {
|
||||
session.unrepliedInteractions.add(BigInt(interaction.id));
|
||||
|
||||
// could be improved
|
||||
setTimeout(() => session.unrepliedInteractions.delete(BigInt(interaction.id)), 15 * 60 * 1000);
|
||||
|
||||
session.emit("interactionCreate", new Interaction(session, interaction));
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user