From ed07d415445ab78b07786725617029580eb9648e Mon Sep 17 00:00:00 2001 From: Stijn De Clercq Date: Sun, 29 Nov 2020 19:20:55 +0100 Subject: [PATCH] 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 --- cogs/testCog.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cogs/testCog.py b/cogs/testCog.py index b81bbda..35b3cb7 100644 --- a/cogs/testCog.py +++ b/cogs/testCog.py @@ -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))