Answer the question
In order to leave comments, you need to log in
How to remove error output from discord chat in discord.py?
After the event with a CD for a temporary reward, errors began to appear not in the console, but in the discord chat. How to remove them?
(When the code is in the bot, other commands do not work)
@bot.event
async def on_command_error(ctx, error):
return
@commands.Cog.listener()
async def on_command_error(self, ctx, error):
if isinstance(error, commands.CommandOnCooldown):
Answer the question
In order to leave comments, you need to log in
Judging by the number of questions about the same thing on the resource, the main reason for most of your problems with this unfortunate bot is significant gaps in computer literacy in general and in knowledge of the Python language in particular. I recommend to postpone the bot for half a year and engage in self-education.
Here is a wonderful tutorial for you .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question