| Conditions | 1 |
| Total Lines | 16 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from typing import Any, Dict, List |
||
| 7 | @Client.event |
||
| 8 | async def on_command_error( |
||
| 9 | self, |
||
| 10 | ctx: MessageContext, |
||
| 11 | error: Exception, |
||
| 12 | args: List[Any], |
||
| 13 | kwargs: Dict[str, Any] |
||
| 14 | ): |
||
| 15 | return Embed( |
||
| 16 | "Oops...", |
||
| 17 | "An error occurred while trying to execute the " |
||
| 18 | f"`{ctx.interaction.data.name}` command! Please retry later!", |
||
| 19 | color=0xff0000 |
||
| 20 | ).add_field( |
||
| 21 | "Exception:", |
||
| 22 | f"```\n{type(error).__name__}:\n{error}\n```" |
||
| 23 | ) |
||
| 39 |