feat: add ticket claiming

This commit is contained in:
Isaac
2022-10-29 00:33:19 +01:00
parent 15318df9e4
commit 77216ba43d
6 changed files with 211 additions and 8 deletions

View File

@@ -8,5 +8,15 @@ module.exports = class ClaimButton extends Button {
});
}
async run (id, interaction) {}
/**
* @param {*} id
* @param {import("discord.js").ChatInputCommandInteraction} interaction
*/
async run(id, interaction) {
/** @type {import("client")} */
const client = this.client;
await interaction.deferReply({ ephemeral: false });
await client.tickets.claim(interaction);
}
};

View File

@@ -8,5 +8,15 @@ module.exports = class UnclaimButton extends Button {
});
}
async run(id, interaction) { }
/**
* @param {*} id
* @param {import("discord.js").ChatInputCommandInteraction} interaction
*/
async run(id, interaction) {
/** @type {import("client")} */
const client = this.client;
await interaction.deferReply({ ephemeral: false });
await client.tickets.release(interaction);
}
};