Replies: 9 comments
-
The log doesn't provide much useful info as WARN itself is not the issue. For some messages, tg-spam may fail to send as markdown and should switch to plain text as a fallback. You may want to run it with --dbg, and this will provide more info. |
Beta Was this translation helpful? Give feedback.
-
For whatever reason it does not type the name of my user. |
Beta Was this translation helpful? Give feedback.
-
your user should be defined in the list of "super-users" in addition to TG related permissions
|
Beta Was this translation helpful? Give feedback.
-
And my user is defined, by its numerical id (as it has no nick) In either way this is not the reason that user's name/id in the log is empty. P.S. Also I see this statement:
https://github.com/umputun/tg-spam/blob/master/README.md#application-options-in-details |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, the log lines you pasted seem to be truncated, so I can't see much information here. Regarding your correction - yes, you are correct; I completely forgot the part that adds all admins to supers automatically. Without seeing more details from the logs, it is hard to say what's going on. I can speculate this is related to the privacy settings of TG, and you may need to disable privacy mode for the bot. |
Beta Was this translation helpful? Give feedback.
-
I do not agree that this is the case here. The state of privacy mode does not matter when the bot has admin rights. Furthermore, it affects whether the bot receives messages or not. In this instance, it is clear that the bot is receiving messages, as evidenced by the reactions in the logs. Nevertheless, I followed the suggestion, but unfortunately, it was unsuccessful.
I am fairly certain that they are not truncated. I consistently receive this type of message in this form. If there are any suggestions on how to obtain complete, untruncated logs, I would appreciate it.
How can I verify whether that part is functioning correctly? When I run the bot without the --admin option, I see the following log entry:
|
Beta Was this translation helpful? Give feedback.
-
It seems that I've found the culprit:
After I've take tg username the problem is gone:
|
Beta Was this translation helpful? Give feedback.
-
I don't think this is a bug; it is just what the system is designed to do. Maybe it's worth clarifying in the README, but I don't recall any place where it promised to support either name or ID. I will move this to FAQ discussions, so if others run into the same issue, they will see the fix. |
Beta Was this translation helpful? Give feedback.
-
See the citation above: All the admins of the group are privileged by default.
This is barely the fix, rather a workaround. But the main point: it is not user-friendly to make users encounter known issues over and over again. |
Beta Was this translation helpful? Give feedback.
-
Also tried to forward spam message to admin group - also no reaction.
The same one more time after bot restart - no reaction.
I'm admin of the group, and my user id is also stated in bot's --admin option.
The relevant part of the log (alexxis1999 is the spammer):
2024/10/11 16:38:54.818 [INFO] user "alexxis1999" (6301007238) added to approved users
2024/10/11 17:13:58.122 [WARN] failed to send message as markdown, Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 35
2024/10/11 19:03:54.669 [WARN] interrupt signal
2024/10/11 19:03:54.669 [ERROR] telegram listener failed, context canceled
2024/10/11 19:03:54.669 [ERROR] telegram listener failed, context canceled
Beta Was this translation helpful? Give feedback.
All reactions