AmarnathCJD / gogram

Full-native implementation of MTProto protocol on Golang.
GNU General Public License v3.0
207 stars 41 forks source link

Bot not responded #47

Closed dkdevxriaproject closed 8 months ago

dkdevxriaproject commented 1 year ago

Why does the bot often not respond, but I don't find anything in the terminal, and I have to restart the program so that the bot can respond, and it happens repeatedly which requires restarting the program, what is the cause?, I don't find any signs of error in the console.

TAMILVIP007 commented 1 year ago

@khenopz16 oh gg thought i am the only one facing this issue. great to see someone with same issue

AmarnathCJD commented 1 year ago

@khenopz16 Provide more details, bot hosted on vps?

dkdevxriaproject commented 1 year ago

Bot on vps, 4vcp 8gb ram

AmarnathCJD commented 1 year ago

@khenopz16 Lemme look into it

AadityaXCode commented 1 year ago

@AmarnathCJD i will look into it too

AnjanaMadu commented 1 year ago

@AmarnathCJD I'll too..

AmarnathCJD commented 1 year ago

@AnjanaMadu Ok tq for your help and support 🥥

TAMILVIP007 commented 1 year ago

@AmarnathCJD iz okie bby. smd

AnjanaMadu commented 1 year ago

@AmarnathCJD Gimme a bounty instead of 🥥

dkdevxriaproject commented 1 year ago

anyone has a solution, I have used the debug log level but I don't see any irregularities in the console everything is as normal but it still often doesn't respond.

AmarnathCJD commented 1 year ago

@khenopz16 Is there a time period to this irresponsive ness?

dkdevxriaproject commented 1 year ago

I can't be sure, but if it doesn't respond, the bot will never respond again if it doesn't start.

dkdevxriaproject commented 1 year ago

Oh yeah, I've used a version of the program in the past, with the same bot and it was normal and never happened like this, this version is https://github.com/AmarnathCJD/gogram/commit/80bad83cb8f0f88742c3ae0b22a8ab8990938c98

AmarnathCJD commented 1 year ago

@khenopz16 Ok :)

AmarnathCJD commented 1 year ago

@khenopz16 @Tamilvip07 do git differ and give output fast t.me/rosexchat

jMurad commented 10 months ago

I have the same problem

RoseLoverX commented 10 months ago

@jMurad Can you send the exact code so I Can replicate it.

jMurad commented 10 months ago

@RoseLoverX,

main.go

package main

import (
    "fmt"

    "github.com/amarnathcjd/gogram/telegram"
)

const (
    appID    = 99999999
    appHash  = "asdasdasdasdasdasdasdasdasdasd"
    phoneNum = "+99999999999"
)

func main() {
    // Create a new client
    fmt.Println("telegram.NewClient")
    client, _ := telegram.NewClient(telegram.ClientConfig{
        AppID:         appID,
        AppHash:       appHash,
        LogLevel:      telegram.LogInfo,
        DeviceModel:   "Server2",
        StringSession: "1Bssadfadsfadsfadsf....asdfasdfasdf",

        // Uncomment this line to use string session
        // SessionFile:   "session.session", // To use session File.
    })

    // Connect to the server
    if err := client.Connect(); err != nil {
        panic(err)
    }

    // Authenticate the client using the bot token
    // This will send a code to the phone number if it is not already authenticated
    if _, err := client.Login(phoneNum); err != nil {
        panic(err)
    }

    fmt.Println("session: ", client.GetSessionID())
}

After three runs of the code I got this result:

        2024/01/07 13:23:45 gogram - mtproto - Info - Connecting to [149.154.167.50:443] - <TCPFull> ...
        2024/01/07 13:23:45 gogram - mtproto - Info - Connection to [149.154.167.50:443] - <TCPFull> established
        session:  6268263452837465723

, and after the fourth run it gave this:

        2024/01/07 13:23:45 gogram - mtproto - Info - Connecting to [149.154.167.50:443] - <TCPFull> ...
        2024/01/07 13:23:45 gogram - mtproto - Info - Connection to [149.154.167.50:443] - <TCPFull> established

the program is still not completed...

AmarnathCJD commented 10 months ago

Maybe its due to DeviceModel Parameter, Im unable to reproduce the error, Ran like 50+ times, Possibly network issue