Add warning command

This commit is contained in:
Tarrgon
2025-05-29 09:36:59 -04:00
parent 2f21c07d1f
commit 1e39b151b1
13 changed files with 281 additions and 20 deletions
+15
View File
@@ -0,0 +1,15 @@
import { ButtonInteraction, Client } from 'discord.js';
import { getWarningMessage } from '../utils/warning-utils';
export default {
name: 'warning-next',
handler: async function (client: Client, interaction: ButtonInteraction, userId: string, page: string) {
await interaction.deferUpdate();
const message = await getWarningMessage(userId, parseInt(page) + 1);
if (!message) return;
interaction.editReply(message);
}
};
+15
View File
@@ -0,0 +1,15 @@
import { ButtonInteraction, Client} from 'discord.js';
import { getWarningMessage } from '../utils/warning-utils';
export default {
name: 'warning-previous',
handler: async function (client: Client, interaction: ButtonInteraction, userId: string, page: string) {
await interaction.deferUpdate();
const message = await getWarningMessage(userId, parseInt(page) - 1);
if (!message) return;
interaction.editReply(message);
}
};