Marzban icon indicating copy to clipboard operation
Marzban copied to clipboard

Telegram bot doesn't work properly

Open mahdim10 opened this issue 11 months ago • 5 comments

Hello, First of all, I would like to thanks all Marzban developers. However, there seems to be an issue with the Telegram bot not sending notifications for users who are about to expire. This problem mostly occurs at 00:00 when multiple users are reaching their expiration time. While it successfully notifies about some users, as indicated in the screenshot, it fails to notify all of them. Im using the 0.4.9 version. photo_2024-03-04_15-28-02 photo_2024-03-04_15-28-06

mahdim10 avatar Mar 04 '24 11:03 mahdim10

i have the same bug and i couldn't find why this is happening , if you find why this is happening send it here

M03ED avatar Mar 04 '24 13:03 M03ED

seems like rate limit of telegram api

fodhelper avatar Mar 04 '24 15:03 fodhelper

seems like rate limit of telegram api

nope its not that because users in begining of list will be skiped not last ones

M03ED avatar Mar 04 '24 17:03 M03ED

maybe should change https://github.com/Gozargah/Marzban/blob/b2ad111eaf7d802e9c747ff34710a407ba3d3319/app/telegram/handlers/report.py#L25-L26

to

        except Exception as e:
            logger.error(e)

to see what the error is?

fodhelper avatar Mar 05 '24 05:03 fodhelper

I guess the problem could be this https://github.com/Gozargah/Marzban/blob/1949717c0a622c20705f998e8e609263d660b269/app/utils/system.py#L119 It's a global variable, it can cause problems for urllib3 ipv6 connections (used in pyTelegramBotAPI too) I have changed it in https://github.com/Gozargah/Marzban/pull/915 - maybe helps

fodhelper avatar Apr 25 '24 22:04 fodhelper

Hello! Please help me figure out the problem, why the bot in Telegram does not work correctly? Description: Installed Marzban. Configured Marzban config for Telegram, as specified in the documentation. Notifications come to Telegram (subscription created, successful/unsuccessful login), but I cannot control the bot. There are buttons for control, I created a default template for creating a subscription, configured it according to the instructions. The point is that I can't even get information about the system from the bot.

Tell me how to overcome this? What data do I need to provide you?

ToadMr avatar Aug 29 '24 13:08 ToadMr