#login issue

1 messages · Page 1 of 1 (latest)

wooden beacon
#

can you type pm2 ls and send a screenshot

stable moth
#

9 is minecraft bot!!!

wooden beacon
#

cool!

#

anyways you don't have multiple instances

#

strange

#

maybe just reset the token

#

and wait and see if it happens again

stable moth
wooden beacon
#

for all i know you hosted the bot on replit at one stage

#

and it just deployed it self 100 times

half folio
#

Maybe you call login() in a loop

stable moth
wooden beacon
#

You're not giving me enough information to help

jolly maple
#

Probably token leak then

wooden beacon
#

yea

#

just reset it

stable moth
stable moth
wooden beacon
#

alright then start it up again

#

and if it happens again it's your codes fault

#

then we can help from there

jolly maple
# stable moth no

Someone might be using it to login your bot and you might it so it's unsure what the case here is.

stable moth
jolly maple
#

Strange

half folio
#

Maybe someone is using your vps

stable moth
wooden beacon
stable moth
#
setInterval(async() => {
    await tryConnection()
    setTimeout(async() => {
    await fs.appendFile("log.txt", message, (e : any) => {
        if (e) {
        fs.writeFile("log.txt", message, (err : any) => {
            if (err) console.log(err)
        })
        }
    });
    
    var embed : MessageEmbed = new MessageEmbed({
        title: "Mysql status",
        description: (mysqlIsDown ?   "**MySQL** :red_circle:\nОтключена" : "**MySQL** :green_circle:\nРаботает\n\n") +
                     (mysql2IsDown ? "**MySQL2** :red_circle:\nОтключена" : "**MySQL2** :green_circle:\nРаботает\n\n") +
                     (mysql3IsDown ? "**MySQL3** :red_circle:\nОтключена" : "**MySQL3** :green_circle:\nРаботает\n\n") +
                     (mysql4IsDown ? "**MySQL4** :red_circle:\nОтключена" : "**MySQL4** :green_circle:\nРаботает\n\n"),
        color: "GREEN",
        timestamp: Date.now()
    })
    for (var i of db) {
        var channel : any = await client.channels.fetch(i.channelId).catch((e : any) => {
                db.splice(db.indexOf(i), 1)
            })
        if (!channel) return;
        
        //
        
        if(mysqlIsDown && !i.downMessage.mysql) channel.send("База данных `mysql` не работает.").then(( m : any ) => {
            db[db.indexOf(i)].downMessage.mysql = m.id
            open("db.json", "w").then(async(file) => {
                await file.write(JSON.stringify(db, null, 4))
                file.close()
            })
        })
        else if (!mysqlIsDown && !i.downMessage.mysql) { // here i get error, can bot shutdown from this error? 
            var m = await channel.messages.fetch().catch((e : any) => {
                db.splice(db.indexOf(i), 1)
            })
            if (!m) return
            m.delete()
            channel.send("База данных `mysql` снова работает!").then((mm : any) => mm.delete())
            db[db.indexOf(i)].downMessage.mysql = null
            open("db.json", "w").then(async(file) => {
                await file.write(JSON.stringify(db, null, 4))
                file.close()
            })
        }
        
        //
        if (!i.messageId) channel.send({embeds: [embed]}).then((m : any) => {
            db[db.indexOf(i)].messageId = m.id
            open("db.json", "w").then(async(file) => {
                await file.write(JSON.stringify(db, null, 4))
                file.close()
            })
        })
        else {
            var m : any = await channel.messages.fetch(i.messageId).catch((e : any) => {
                db.splice(db.indexOf(i), 1)
            })
            if (!m) return
            m.edit({embeds: [embed]})
        }
    }
    
    setTimeout(async() => {
        message = ""
    }, 1000)
    }, 5000)
}, 30000)
stable moth
#

bot can shutdown from this error?

#

@wooden beacon

wooden beacon
#

Also maybe show the code where mysql exists

stable moth