#95 : Replaced : with / for commands
This commit is contained in:
parent
46fdb3edb6
commit
e8aee51248
@ -1,11 +1,11 @@
|
|||||||
export function isCommand(message: string, command?: string) {
|
export function isCommand(message: string, command?: string) {
|
||||||
if (command) {
|
if (command) {
|
||||||
return message.startsWith(`:${command} `)
|
return message.startsWith(`/${command} `)
|
||||||
}
|
}
|
||||||
return message.startsWith(':')
|
return message.startsWith('/')
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getArgs(command: string, message: string): string[] | undefined {
|
export function getArgs(command: string, message: string): string[] | undefined {
|
||||||
if (!isCommand(message, command)) return
|
if (!isCommand(message, command)) return
|
||||||
return message.split(`:${command} `)[1].split(' ')
|
return message.split(`/${command} `)[1].split(' ')
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user