HS-Tools / Wall_Lii

Does leaderboard scraping and then does stuff with that data
18 stars 7 forks source link

added ignoring of CommandNotFound error #116

Closed quinnabrvau closed 2 years ago

quinnabrvau commented 2 years ago

@JimLiu0 you should double check this but I believe it will suppress the error messages that are clogging up the logs

also removed 1 duplicate function to an alias for clean up, because I couldn't help myself

JimLiu0 commented 2 years ago

It did not appear to work, I'm still getting the CommandNotFound error logged to STDERR

JimLiu0 commented 2 years ago

I added this code to ignore CommandNotFound after updating twitchio to 2.3.0

@twitchBot.event() async def event_command_error(error, data): if type(data) == CommandNotFound: return traceback.print_exception( type(error), error, error.__traceback__, file=sys.stderr)

JimLiu0 commented 2 years ago

Never mind this doesn't actually prevent these errors from still printing. It just allows for extra code to be ran.

Ignoring exception in command: No command "test" was found.: twitchio.ext.commands.errors.CommandNotFound: No command "test" was found.