Last active
December 22, 2021 19:47
-
-
Save kaecy/337e00a4c187e22191098b92063ccb02 to your computer and use it in GitHub Desktop.
Py/Telegram extension.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from telethon.tl.types import MessageEntityMention | |
def getMentionEntities(message): | |
mentions = [] | |
for entity in message.entities: | |
if type(entity) is MessageEntityMention: | |
offset = entity.offset | |
length = entity.length | |
mentions.append(message.message[offset:offset + length]) | |
return mentions | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
why don't you like muslims? what did allah do to you?