Add custom error handler to test function so it doesn't spam everything in #Error-Logs all the time but prints them in your terminal

pull/10/head
Stijn De Clercq 2020-11-29 19:20:55 +01:00
parent 1f685bfbe9
commit ed07d41544
1 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,10 @@ class TestCog(commands.Cog):
async def test(self, ctx):
pass
@test.error
async def test_handler(self, ctx, error):
raise error
def setup(client):
client.add_cog(TestCog(client))