feat(permissions): Adds server permissions

This commit is contained in:
Michel Fedde 2025-06-24 20:58:46 +02:00
parent d46bbd84c5
commit cf9c88a2d6
24 changed files with 415 additions and 69 deletions

View file

@ -1,4 +1,9 @@
import {inlineCode} from "discord.js";
export class UserError extends Error {
shouldLog: boolean = false;
constructor(
message: string,
public readonly tryInstead: string | null = null
@ -7,4 +12,15 @@ export class UserError extends Error {
}
public getDiscordMessage(e: UserError): string {
let userMessage = `:x: \`${e.message}\` - Please validate your request!`
if (e.tryInstead) {
userMessage += `
You can try the following:
${inlineCode(e.tryInstead)}`
}
return userMessage;
}
}