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:
parent
835f4e661b
commit
85c12781d9
1 changed files with 1 additions and 8 deletions
9
index.js
9
index.js
|
@ -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');
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue