how to ignore a update from a user #8
-
|
so , i have a bot and i need to ignore updates from a user that i banned , is that possible? |
Beta Was this translation helpful? Give feedback.
Answered by
kian-ahmadian
Jan 6, 2023
Replies: 1 comment 4 replies
-
|
Hi @Codingwithamin
from bale import Updater
class CustomUpdater(Updater):
def __init__(self, bot):
super().__init__(bot)
def call_to_dispatch(self, update):
if not ( update.type.is_message_update() and update.message.author.user_id == 1234):
return await super().call_to_dispatch(update)now you can set your custom updater to bot. Enjoy! 🤗 |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
kian-ahmadian
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @Codingwithamin
now you can set your custom updater to bot.
Enjoy! 🤗