1
0
Fork 0
mirror of https://github.com/ChomeNS/chomens-bot-mc.git synced 2025-04-01 06:49:49 -04:00

use codeblock on uncaughtException on discord

real
This commit is contained in:
ChomeNS 2022-10-15 18:10:32 +07:00
parent 835f4e661b
commit 85c12781d9

View file

@ -274,13 +274,6 @@ function main() {
loginfinish = true;
await sleep(1400);
bot.core.run('minecraft:tellraw @a ' + JSON.stringify([{text: 'ChomeNS Bot', color: 'yellow'}, {text: ' - a bot made by ', color: 'gray'}, {text: 'chayapak', color: 'gold'}]));
corefill = setInterval(async function() {
try {
bot.core.fillCore(true);
} catch (e) {
return;
}
}, 2000);
// NotOnline mode enabled
notonline = setInterval(async function() {
fs.readFile('./notonline.txt', 'utf8', (_err, data) => {
@ -383,7 +376,7 @@ function main() {
process.on('uncaughtException', (error) => {
console.log('uncaught ' + util.inspect(error));
channel.send('uncaught ' + util.inspect(error));
channel.send('uncaught ```\n' + util.inspect(error) + '\n```');
bot.emit('end', 'uncaughtException', 'process: uncaughtException');
});