T
T
Telmor2021-10-19 15:45:45
Python
Telmor, 2021-10-19 15:45:45

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

I don't know how to continue to work with this code so that errors would go to the console, or not be sent in general.
(cd code below)
@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

1 answer(s)
A
Alan Gibizov, 2021-10-20
@phaggi

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 question

Ask a Question

731 491 924 answers to any question