mirror of
https://github.com/nx-bat/discordbot-ng.git
synced 2026-09-22 02:19:09 -04:00
15 lines
451 B
TypeScript
15 lines
451 B
TypeScript
import { ButtonInteraction, Client} from 'discord.js';
|
|
import { getNoteMessage } from '../utils/note-utils';
|
|
|
|
export default {
|
|
name: 'note-previous',
|
|
handler: async function (client: Client, interaction: ButtonInteraction, userId: string, page: string) {
|
|
await interaction.deferUpdate();
|
|
|
|
const message = await getNoteMessage(userId, parseInt(page) - 1);
|
|
|
|
if (!message) return;
|
|
|
|
interaction.editReply(message);
|
|
}
|
|
}; |