fix(command): 🚸 make bot address regex (prefix) more lenient

Should also accept server commands now on address
master
jay 3 years ago
parent 356f83e39b
commit cbb105fe49
  1. 3
      lib/index.js

@ -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 })

Loading…
Cancel
Save