Added basic command error handling

This commit is contained in:
2022-07-19 14:03:14 +02:00
parent 2f92dfe22f
commit 47b8af57cd
14 changed files with 205 additions and 26 deletions

View File

@@ -24,7 +24,11 @@
"Bot": {
"910199451145076828": {
"MessageDeleteTimer": 6
}
},
"Technicians": [
240160344557879316,
236592458664902657
]
},
"Base": {
"910199451145076828": {

View File

@@ -22,7 +22,10 @@
"Bot": {
"910199451145076828": {
"MessageDeleteTimer": 2
}
},
"Technicians": [
240160344557879316
]
},
"Base": {
"910199451145076828": {

View File

@@ -23,7 +23,11 @@
},
"910199451145076828": {
"MessageDeleteTimer": 2
}
},
"Technicians": [
240160344557879316,
236592458664902657
]
},
"Base": {
"650366049023295514": {

View File

@@ -20,7 +20,11 @@
"Bot": {
"910199451145076828": {
"MessageDeleteTimer": 4
}
},
"Technicians": [
240160344557879316,
236592458664902657
]
},
"Base": {
"910199451145076828": {

View File

@@ -11,6 +11,7 @@ from modules.base.command.afk_command import AFKCommand
from modules.base.command.help_command import HelpCommand
from modules.base.command.info_command import InfoCommand
from modules.base.command.ping_command import PingCommand
from modules.base.events.base_on_command_error_event import BaseOnCommandErrorEvent
from modules.moderator.command.purge_command import PurgeCommand
from modules.base.command.user_info_command import UserInfoCommand
from modules.base.events.base_on_member_join_event import BaseOnMemberJoinEvent
@@ -47,6 +48,8 @@ class StartupDiscordExtension(StartupExtensionABC):
dc.add_command(PingCommand)
dc.add_command(UserInfoCommand)
""" events """
# on_command_error
dc.add_event(DiscordEventTypesEnum.on_command_error.value, BaseOnCommandErrorEvent)
# on_member_join
dc.add_event(DiscordEventTypesEnum.on_member_join.value, BaseOnMemberJoinEvent)
# on_member_remove

View File

@@ -14,6 +14,7 @@
"goodbye_message": "Schade das du uns so schnell verlässt :("
},
"base": {
"technician_command_error_message": "Es gab ein Fehler mit dem Befehl: {} ausgelöst von {} -> {}\nDatum und Zeit: {}\nSchau bitte ins log für Details.",
"welcome_message": "Hello There!\nIch heiße dich bei {} herzlichst willkommen!",
"welcome_message_for_team": "{} hat gerade das Irrenhaus betreten.",
"purge_message": "Na gut..., ich lösche alle Nachrichten wenns sein muss.",