Small fix to new error handler, added more debug in --debug (now with extra spam)

This commit is contained in:
Frisk 2020-08-01 02:30:49 +02:00
parent 8ca9918464
commit eb6e03a365
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC
3 changed files with 4 additions and 3 deletions

2
.gitignore vendored
View file

@ -4,4 +4,4 @@ settings.json
*.db
*.code-workspace
*.bat
/locale/
source-file-list.txt

View file

@ -159,6 +159,7 @@ def global_exception_handler(loop, context):
else:
shutdown(loop)
async def main_loop():
loop = asyncio.get_event_loop()
try:
@ -179,4 +180,4 @@ async def main_loop():
shutdown(loop)
asyncio.run(main_loop())
asyncio.run(main_loop(), debug=command_line_args.debug)

View file

@ -111,7 +111,7 @@ async def formatter_exception_logger(wiki_url, change, exception):
message = DiscordMessage("embed", "bot/exception", [None], wiki=None)
message["description"] = exception
message["title"] = "RC Exception Report"
change = change[0:1000]
change = str(change)[0:1000]
message.add_field("Wiki URL", wiki_url)
message.add_field("Change", change)
message.finish_embed()