mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-27 09:35:35 -05:00
idk but i want color codes back
This commit is contained in:
parent
e8e1321791
commit
1679f252e3
1 changed files with 5 additions and 5 deletions
|
@ -45,13 +45,13 @@ function inject(bot, dcclient) {
|
|||
bot.command_handler.main(prefix, username, usernameraw, message, sender, channeldc);
|
||||
}
|
||||
};
|
||||
bot.on('message', async (username, message, sender) => {
|
||||
bot.on('message', async (usernamee, messagee, senderr) => {
|
||||
// try catch cuz TypeError: Cannot read properties of undefined (reading 'replace')
|
||||
try {
|
||||
const usernameraw = username.replace(/§[a-f0-9rlonmk]/g, '').replace(/§/g, '');
|
||||
var sender = bot.playersAddedPlayers[usernameraw];
|
||||
var username = bot.getplayerusername[sender];
|
||||
var message = message.replace(/§[a-f0-9rlonmk]/g, '').replace(/§/g, '');
|
||||
const usernameraw = usernamee.replace(/§[a-f0-9rlonmk]/g, '').replace(/§/g, '');
|
||||
const sender = bot.playersAddedPlayers[usernameraw];
|
||||
const username = bot.getplayerusername[senderr];
|
||||
const message = messagee.replace(/§r/ /* /§[a-f0-9rlonmk]/g */, '').replace(/§/g, '');
|
||||
bot.command_handler.run(username, usernameraw, message, sender);
|
||||
} catch (e) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue