mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 06:33:03 -04:00
Commands: basic error handling
This commit is contained in:
parent
83d480a68c
commit
267b2b1a07
6 changed files with 240 additions and 181 deletions
|
@ -157,3 +157,11 @@ export function suppressErrors<F extends Function>(name: string, func: F, thisOb
|
|||
}
|
||||
}) as any as F;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap the text in ``` with an optional language
|
||||
*/
|
||||
export function makeCodeblock(text: string, language?: string) {
|
||||
const chars = "```";
|
||||
return `${chars}${language || ""}\n${text}\n${chars}`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue