diff --git a/Stroopwafel.py b/Stroopwafel.py index d00fc68..55f0f33 100644 --- a/Stroopwafel.py +++ b/Stroopwafel.py @@ -29,6 +29,21 @@ intents.members = True bot = commands.Bot(command_prefix=commands.when_mentioned_or('!'), description='Stroopwafel. Shitpost bot extraordinaire.', pm_help=True, intents=intents) +@bot.event +async def on_command_error(ctx, error): + if isinstance(error, commands.BadArgument): + await ctx.send(f"{ctx.author.mention} Onheus gebruik van het commando. Lees de docs nog eens door:") + await ctx.send_help(ctx.command) + return + if isinstance(error, commands.MissingRequiredArgument): + await ctx.send(f"{ctx.author.mention} Volgens bij ben je nog iets vergeten toe te voegen aan dit commando. Lees de docs nog eens door:") + await ctx.send_help(ctx.command) + return + if isinstance(error, commands.CommandNotFound): + await ctx.send(f"{ctx.author.mention} Vermoedelijk bedoelde je iets anders. Typ !help voor alle opties.") + return + raise error + @bot.event async def on_ready(): await add_cogs(bot)