Fixed chat prompt regex breaking if no username prefix is configured.
This commit is contained in:
@@ -5,7 +5,7 @@ const bhttp = require('bhttp');
|
|||||||
|
|
||||||
const style = require('../utils/style');
|
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 history = new Map();
|
||||||
|
|
||||||
const settings = config.chat;
|
const settings = config.chat;
|
||||||
|
|||||||
Reference in New Issue
Block a user