Use correct function

This commit is contained in:
Tarrgon
2025-06-07 08:44:44 -04:00
parent a2852bf454
commit 920477b8b7
+1 -2
View File
@@ -141,8 +141,7 @@ export default {
}; };
async function purgePhrases(interaction: ChatInputCommandInteraction, user: User) { async function purgePhrases(interaction: ChatInputCommandInteraction, user: User) {
const phrases: TicketPhrase[] = []; const phrases: TicketPhrase[] = await Database.getTicketPhrasesFor(user.id);
await Database.getAllTicketPhrases(phrases.push);
const count = await Database.removeAllTicketPhrasesFor(user.id); const count = await Database.removeAllTicketPhrasesFor(user.id);
interaction.reply(`Purged the following phrases (${count}): ${phrases.map(p => `\`${p.phrase}\``).join('\n')}`); interaction.reply(`Purged the following phrases (${count}): ${phrases.map(p => `\`${p.phrase}\``).join('\n')}`);