Skip to content

Commit

Permalink
Add on_all decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
z44d committed Jun 26, 2024
1 parent f038438 commit a6c728b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tgram/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@


class Decorators:
def on_all(self: "tgram.TgBot"):
def decorator(func: Callable) -> Callable:
self.add_handler(Handler(callback=func))
return func

return decorator

def on_message(self: "tgram.TgBot", filters: Filter = None):
def decorator(func: Callable) -> Callable:
self.add_handler(
Expand Down

0 comments on commit a6c728b

Please sign in to comment.