Updated buttonhandler to ignore tempbuttons

This commit is contained in:
2024-09-09 22:36:01 +02:00
parent fc50bc7a78
commit 7655768c30
3 changed files with 15 additions and 4 deletions

View File

@@ -32,7 +32,10 @@ export default async function loadButtonEvents(client: Client, ft: FileType) {
client.on(Events.InteractionCreate, async interaction => {
if (!interaction.isButton()) return
const button = client.buttons.get(interaction.customId)
const customId = interaction.customId
if (customId.startsWith("tempbutton-")) return
const button = client.buttons.get(customId)
if (!button) {
console.error(`No event matching ${interaction.customId} was found.`)