use camelcase file names from now on...

This commit is contained in:
2024-08-21 20:55:58 +02:00
parent acc9eaae9e
commit 6b97e7d9cb
55 changed files with 396 additions and 116 deletions

11
src/utilities/chat.ts Normal file
View File

@ -0,0 +1,11 @@
export function isCommand(message: string, command?: string) {
if (command) {
return message.startsWith(`:${command} `)
}
return message.startsWith(':')
}
export function getArgs(command: string, message: string): string[] | undefined {
if (!isCommand(message, command)) return
return message.split(`:${command} `)[1].split(' ')
}