Gozargah / Marzban

Unified GUI Censorship Resistant Solution Powered by Xray
https://t.me/gozargah_marzban
GNU Affero General Public License v3.0
3.69k stars 508 forks source link

Telegram bot doesn't work properly #845

Closed mahdim10 closed 4 months ago

mahdim10 commented 8 months ago

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

M03ED commented 8 months ago

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

fodhelper commented 8 months ago

seems like rate limit of telegram api

M03ED commented 8 months ago

seems like rate limit of telegram api

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

fodhelper commented 8 months ago

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 commented 6 months ago

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

ToadMr commented 2 months ago

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?