fix(command): 🚸 make bot address regex (prefix) more lenient
Should also accept server commands now on address
This commit is contained in:
@@ -120,7 +120,8 @@ bot.once("spawn", () => {
|
||||
}
|
||||
|
||||
cfg.plugins = plugins
|
||||
cfg.botAddressRegex = new RegExp(`^${bot.username} (${cfg.botAddressPrefix}.+)`)
|
||||
// cfg.botAddressPrefix = ${bot.username.substr(-2,2)}
|
||||
cfg.botAddressRegex = new RegExp(`^${bot.username}:? (/|${cfg.botAddressPrefix}.+)`)
|
||||
// FIXME leaks every load, so adding here instead of command.js to load only once
|
||||
bot.addChatPattern("web", /\[WEB\] (\[.+\])?\s*([\w.]+): (.+)/, { parse: true })
|
||||
|
||||
|
Reference in New Issue
Block a user