Skip to content

Commit d35f8d5

Browse files
committed
changed added commands
1 parent 1ec2f19 commit d35f8d5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

dabot.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ async def on_command_error(i: discohook.Interaction, error: Exception):
5353
await i.response.send(user_response, ephemeral=True)
5454
print(f"Command error occurred. {error}")
5555

56-
import commands.help
57-
import commands.faq
56+
try:
57+
exec(compile(open(f"./commands/{f}.py", "rb").read(), f"./commands/{f}.py", 'exec'))
58+
except:
59+
print(f"There was an error with the {f} command file.")
5860

5961
app.add_commands(help, faq)
6062

0 commit comments

Comments
 (0)