Skip to content

Commit 140716e

Browse files
committed
Fix Order of Handlers
1 parent 8261fdb commit 140716e

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

rules_bot.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -180,20 +180,6 @@ def main() -> None:
180180
MessageHandler(filters.TEXT & filters.UpdateType.MESSAGES & ~filters.COMMAND, reply_search)
181181
)
182182

183-
# Delete unhandled commands - e.g. for users that like to click on blue text in other messages
184-
application.add_handler(MessageHandler(filters.COMMAND, delete_message))
185-
186-
# Status updates
187-
application.add_handler(
188-
MessageHandler(
189-
filters.Chat(username=[ONTOPIC_USERNAME, OFFTOPIC_USERNAME])
190-
& filters.StatusUpdate.NEW_CHAT_MEMBERS,
191-
delete_message,
192-
block=False,
193-
),
194-
group=1,
195-
)
196-
197183
# Inline Queries
198184
application.add_handler(InlineQueryHandler(inlinequeries.inline_query))
199185

@@ -211,6 +197,20 @@ def main() -> None:
211197
application.add_handler(ChatJoinRequestHandler(callback=join_request_callback, block=False))
212198
application.add_handler(CallbackQueryHandler(join_request_buttons, pattern="^JOIN"))
213199

200+
# Delete unhandled commands - e.g. for users that like to click on blue text in other messages
201+
application.add_handler(MessageHandler(filters.COMMAND, delete_message))
202+
203+
# Status updates
204+
application.add_handler(
205+
MessageHandler(
206+
filters.Chat(username=[ONTOPIC_USERNAME, OFFTOPIC_USERNAME])
207+
& filters.StatusUpdate.NEW_CHAT_MEMBERS,
208+
delete_message,
209+
block=False,
210+
),
211+
group=1,
212+
)
213+
214214
# Error Handler
215215
application.add_error_handler(error_handler)
216216

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy