minor fixes

This commit is contained in:
2024-10-19 22:22:27 +08:00
parent 4173972407
commit 80b630d28d
+4 -2
View File
@@ -28,8 +28,10 @@ def send_action(action):
def decorator(func): def decorator(func):
@wraps(func) @wraps(func)
async def command_func(update: Update, context: CustomContext, *args, **kwargs): async def command_func(update: Update, context: CustomContext, *args, **kwargs):
await update.effective_chat.send_action(action) try:
return await func(update, context, *args, **kwargs) await update.effective_chat.send_action(action)
finally:
return await func(update, context, *args, **kwargs)
return command_func return command_func