3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-14 13:55:03 +00:00

Added slash command deferral to avoid timeouts

This commit is contained in:
Lily Bergonzat 2024-02-26 22:05:25 +01:00
parent ee861bb5e9
commit 408f1b9c30
22 changed files with 32 additions and 3 deletions

View file

@ -42,6 +42,7 @@ export const ForceMuteSlashCmd = {
signature: [slashOptions.user({ name: "user", description: "The user to mute", required: true }), ...opts],
async run({ interaction, options, pluginData }) {
await interaction.deferReply({ ephemeral: true });
const attachments = retrieveMultipleOptions(NUMBER_ATTACHMENTS_CASE_CREATION, options, "attachment");
if ((!options.reason || options.reason.trim() === "") && attachments.length < 1) {