Add button handlers

This commit is contained in:
Tarrgon
2025-05-31 11:15:37 -04:00
parent e8a57468de
commit a61f61485d
2 changed files with 30 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
import { ButtonInteraction, Client } from 'discord.js';
import { getRecordMessageFromDiscordId } from '../utils';
export default {
name: 'records-next',
handler: async function (client: Client, interaction: ButtonInteraction, userId: string, page: string) {
await interaction.deferUpdate();
const message = await getRecordMessageFromDiscordId(userId, parseInt(page) + 1, interaction.guild!);
if (!message) return;
interaction.editReply(message);
}
};