fix most things

This commit is contained in:
ChomeNS 2022-11-13 13:57:18 +07:00
parent a2adbbb955
commit be8908ab6e
3 changed files with 3 additions and 1 deletions

View file

@ -48,6 +48,7 @@ function inject(bot, dcclient, config) {
}
};
bot.on('message', async (usernamee, messagee, senderr) => {
console.log()
// try catch cuz TypeError: Cannot read properties of undefined (reading 'replace')
try {
const usernameraw = usernamee.replace(/§[a-f0-9rlonmk]/g, '').replace(/§/g, '');

View file

@ -1,6 +1,7 @@
/* eslint-disable max-len */
/* eslint-disable prefer-rest-params */
const moment = require('moment-timezone');
const util = require('util');
function inject(bot, dcclient, config, rl) {
if (!config.console) return;

View file

@ -108,7 +108,7 @@ function inject(bot, dcclient, config) {
function addPlayer(player, packet) {
// if (bot.players.getPlayer(player)) bot.emit('player_unvanished', player, packet);
// else bot.emit('player_added', player, packet);
/* else */bot.emit('player_added', player, packet);
bot.players.addPlayer(player);
}