Skip to content

Conversation

@ayaka14732
Copy link

@ayaka14732 ayaka14732 commented Aug 16, 2022

In the previous version, when chat.banUsers is set to false, we use parseInt(`${new Date().getTime() / 1000 + 45}`) to ban a user for 45 seconds. The intention is that the ban will be automatically lifted after 45 seconds.

Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.

In practice, however, this often does not work, and will cause the user to be banned permanently, which has been raised in #106.

In this pull request, I substitute the 45-second approach with the bot.telegram.unbanChatMember API, which will remove a member from the chat (similar to bot.telegram.kickChatMember) but without banning it.

@jazyokey
Copy link

My phone number is banned from telegram how can I recover

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants