Skip to content

Commit

Permalink
chore: temporary disable echo handler
Browse files Browse the repository at this point in the history
  • Loading branch information
orenlab committed Jan 17, 2025
1 parent 511c999 commit 4d35909
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions pytmbot/handlers/handler_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
handle_totp_code_verification,
)
from pytmbot.handlers.bot_handlers.about import handle_about_command
from pytmbot.handlers.bot_handlers.echo import handle_echo
from pytmbot.handlers.bot_handlers.inline.update import handle_update_info
from pytmbot.handlers.bot_handlers.navigation import handle_navigation
from pytmbot.handlers.bot_handlers.plugins import handle_plugins
Expand Down Expand Up @@ -314,23 +313,22 @@ def inline_handler_factory() -> HandlerType:
for category, handlers in configs.items()
}

# def echo_handler_factory() -> HandlerType:
# """
# Returns a dictionary of HandlerManager objects for echo handling.

def echo_handler_factory() -> HandlerType:
"""
Returns a dictionary of HandlerManager objects for echo handling.
This is always the last handler to be registered.
"""
configs = {
"echo": [
HandlerConfig(
callback=handle_echo,
filter_func=lambda message: True
)
]
}
# This is always the last handler to be registered.
# """
# configs = {
# "echo": [
# HandlerConfig(
# callback=handle_echo,
# filter_func=lambda message: True
# )
# ]
# }

return {
category: [config.create_handler() for config in handlers]
for category, handlers in configs.items()
}
# return {
# category: [config.create_handler() for config in handlers]
# for category, handlers in configs.items()
# }

0 comments on commit 4d35909

Please sign in to comment.