mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-27 09:35:35 -05:00
fix most things
This commit is contained in:
parent
a2adbbb955
commit
be8908ab6e
3 changed files with 3 additions and 1 deletions
|
@ -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, '');
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue