Telegram Bot: Clean Exceptions List of Verified Users
Earlier we implemented two anti-advertising bots
These two bots, when setting group members to mute and unmute, both add records to the Exceptions list.
We found that users who passed the verification also leave records in Exceptions, even if they are consistent with the group's default permissions.
For the convenience of group management, we hope to clear this kind of records.
This way, the remaining records are definitely those with restricted speaking permissions, i.e., those who did not pass the verification. We can kick them out of the group directly.
After so many days of use, we are already an "old hand" at GPT development.
Can the following requirements be achieved using the Telethon library?
Check all settings in the exceptions of the group's permissions,
if a certain group member's permissions are the same as the group's default permissions, then delete this setting from the exceptions.
Unfortunately, the framework logic of the code given by GPT looks fine, but it keeps reporting errors when running. It seems we have to read the documentation again. T_T
Continuously learning in the official documentation which function has what parameters, what values the parameters have, what the function's return value structure is, what attributes this structure has, ...
During this period, I also encountered a pitfall regarding user permissions
Finally, it's done.
Github

