MCPcopy Create free account
hub / github.com/AsmSafone/VideoPlayerBot / errors

Function errors

helpers/decorators.py:26–33  ·  view source on GitHub ↗
(func: Callable)

Source from the content-addressed store, hash-verified

24
25
26def 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
36def authorized_users_only(func: Callable) -> Callable:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected