mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-26 12:41:03 +00:00
feat(bots/discord): framework changes and new features
- Migrated to a new command framework which looks better and works better - Fixed commands not being bundled correctly - Added message (prefix) commands with argument validation - Added a new CommandErrorType, for invalid arguments - `/eval` is now a bit safer - Corrected colors for the coinflip embed - `/stop` now works even when the bot is not connected to the API
This commit is contained in:
@@ -17,6 +17,7 @@ export default class CommandError extends Error {
|
||||
export enum CommandErrorType {
|
||||
Generic,
|
||||
MissingArgument,
|
||||
InvalidArgument,
|
||||
InvalidUser,
|
||||
InvalidChannel,
|
||||
InvalidDuration,
|
||||
@@ -25,6 +26,7 @@ export enum CommandErrorType {
|
||||
const ErrorTitleMap: Record<CommandErrorType, string> = {
|
||||
[CommandErrorType.Generic]: 'An exception was thrown',
|
||||
[CommandErrorType.MissingArgument]: 'Missing argument',
|
||||
[CommandErrorType.InvalidArgument]: 'Invalid argument',
|
||||
[CommandErrorType.InvalidUser]: 'Invalid user',
|
||||
[CommandErrorType.InvalidChannel]: 'Invalid channel',
|
||||
[CommandErrorType.InvalidDuration]: 'Invalid duration',
|
||||
|
||||
Reference in New Issue
Block a user