Fixed chat prompt regex breaking if no username prefix is configured.
This commit is contained in:
parent
834ccc3ea0
commit
8f37ee145e
|
@ -5,7 +5,7 @@ const bhttp = require('bhttp');
|
|||
|
||||
const style = require('../utils/style');
|
||||
|
||||
const promptRegex = new RegExp(`^${config.usernamePrefix}?${config.user.username}[:,\\s]`, 'ui');
|
||||
const promptRegex = new RegExp(`^${config.usernamePrefix ? `${config.usernamePrefix}?` : ''}${config.user.username}[:,\\s]`, 'ui');
|
||||
const history = new Map();
|
||||
|
||||
const settings = config.chat;
|
||||
|
|
Loading…
Reference in New Issue