mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 18:54:55 -05:00
typeof
This commit is contained in:
parent
f0cb30d790
commit
f5008fcec8
1 changed files with 1 additions and 3 deletions
4
index.js
4
index.js
|
@ -383,7 +383,7 @@ function main() {
|
||||||
|
|
||||||
let timeout = 1000;
|
let timeout = 1000;
|
||||||
|
|
||||||
if (reason.text) {
|
if (typeof reason.text==='undefined') {
|
||||||
if (reason.text.find((data) => data.text === 'Wait 5 seconds before connecting, thanks! :)')) timeout = 1000 * 6;
|
if (reason.text.find((data) => data.text === 'Wait 5 seconds before connecting, thanks! :)')) timeout = 1000 * 6;
|
||||||
if (reason.text.find((data) => data.text === 'You are logging in too fast, try again later.')) timeout = 1000 * 6;
|
if (reason.text.find((data) => data.text === 'You are logging in too fast, try again later.')) timeout = 1000 * 6;
|
||||||
}
|
}
|
||||||
|
@ -457,12 +457,10 @@ dcclient.on('ready', async () => {
|
||||||
}
|
}
|
||||||
if (line==='.notonline on') {
|
if (line==='.notonline on') {
|
||||||
fs.writeFileSync('./notonline.txt', 'true');
|
fs.writeFileSync('./notonline.txt', 'true');
|
||||||
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(['', {text: 'NotOnline mode enabled', color: 'white'}]));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (line==='.notonline off') {
|
if (line==='.notonline off') {
|
||||||
fs.writeFileSync('./notonline.txt', 'false');
|
fs.writeFileSync('./notonline.txt', 'false');
|
||||||
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(['', {text: 'NotOnline mode disabled', color: 'white'}]));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (line.toLowerCase()==='.resethash') {
|
if (line.toLowerCase()==='.resethash') {
|
||||||
|
|
Loading…
Reference in a new issue