def handler(event):
if event.added_by:
...
if event.user_added:
Bro It Does not work ! Even When a user joins a channel , events.ChatAction doesn't answers !
self join is different than being added, it's better you remove the "if", and print the event, ornery with event.user_joined instead.
I printed event , but nothing printed
server didn't send it then, is it a bot account or user
I want to write a bot if a user joined in any channel, I will write them in a sqlite db with next to time.time() and then get all the rows where that the user joined at last 60 seconds . if num_rows was greater than 10 I make channel rivate.
sqlite part is offtopic. for join part, the ChatAction should work fine. as long as your bot is admin if event.user_joined: user = await event.get_user()
Обсуждают сегодня