(func: Callable)
| 24 | |
| 25 | |
| 26 | def errors(func: Callable) -> Callable: |
| 27 | async def decorator(client: Client, message: Message): |
| 28 | try: |
| 29 | return await func(client, message) |
| 30 | except Exception as e: |
| 31 | await message.reply_text(f"{type(e).__name__}: {e}") |
| 32 | |
| 33 | return decorator |
| 34 | |
| 35 | |
| 36 | def authorized_users_only(func: Callable) -> Callable: |
nothing calls this directly
no outgoing calls
no test coverage detected