Adds transfer of leadership of a group

This commit is contained in:
Michel Fedde 2025-05-27 20:00:10 +02:00
parent fccc30626a
commit 13f2bf30fa
4 changed files with 67 additions and 4 deletions

View file

@ -6,7 +6,7 @@ import {
ChatInputCommandInteraction,
MessageFlags,
Activity,
ActivityType, REST
ActivityType, REST, inlineCode
} from "discord.js";
import Commands from "./Commands/Commands";
import {Container} from "../Container/Container";
@ -96,6 +96,12 @@ export class DiscordClient {
let userMessage = ":x: There was an error while executing this command!";
if (e.constructor.name === UserError.name) {
userMessage = `:x: \`${e.message}\` - Please validate your request!`
if (e.tryInstead) {
userMessage += `
You can try the following:
${inlineCode(e.tryInstead)}`
}
}
if (interaction.replied || interaction.deferred) {
await interaction.followUp({ content: userMessage, flags: MessageFlags.Ephemeral });