fix(command): 🚸 make bot address regex (prefix) more lenient
Should also accept server commands now on address
This commit is contained in:
parent
356f83e39b
commit
cbb105fe49
|
@ -120,7 +120,8 @@ bot.once("spawn", () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg.plugins = plugins
|
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
|
// FIXME leaks every load, so adding here instead of command.js to load only once
|
||||||
bot.addChatPattern("web", /\[WEB\] (\[.+\])?\s*([\w.]+): (.+)/, { parse: true })
|
bot.addChatPattern("web", /\[WEB\] (\[.+\])?\s*([\w.]+): (.+)/, { parse: true })
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user