diff --git a/src/bot.py b/src/bot.py index b9b0890..dceaddc 100644 --- a/src/bot.py +++ b/src/bot.py @@ -320,7 +320,7 @@ async def discussion_handler(): try: while True: fetch_all = db_cursor.execute( - 'SELECT wiki, wikiid, postid FROM rcgcdw WHERE wikiid IS NOT NULL') + 'SELECT wiki, wikiid, rcid, postid FROM rcgcdw WHERE wikiid IS NOT NULL') for db_wiki in fetch_all.fetchall(): header = settings["header"] header["Accept"] = "application/hal+json" @@ -441,7 +441,7 @@ async def main_loop(): await asyncio.gather(main_tasks["wiki_scanner"], main_tasks["discussion_handler"], main_tasks["message_sender"]) except KeyboardInterrupt: shutdown(loop) - except asyncio.exceptions.CancelledError: + except asyncio.CancelledError: return asyncio.run(main_loop(), debug=False) diff --git a/src/discord.py b/src/discord.py index 07da73c..5584718 100644 --- a/src/discord.py +++ b/src/discord.py @@ -113,7 +113,7 @@ async def generic_msg_sender_exception_logger(exception: str, title: str, **kwar message = DiscordMessage("embed", "bot/exception", [None], wiki=None) message["description"] = exception message["title"] = title - for key, value in kwargs: + for key, value in kwargs.items(): message.add_field(key, value) message.finish_embed() await send_to_discord_webhook_monitoring(message)