diff --git a/utils.py b/utils.py index 6ee956e..b462915 100644 --- a/utils.py +++ b/utils.py @@ -496,7 +496,15 @@ async def get_clan_message_channel( return await guild.fetch_channel(channel_id) except nextcord.NotFound: # the channel was deleted for some reason - return await guild.create_text_channel( + ret_channel = await guild.create_text_channel( channel_name, reason="Creating channel as required for by design of Dakiny-Messages repo.", ) + stmt = ( + update(Messages) + .where(Messages.Path == channel_name) + .values(Id=ret_channel.id) + ) + session.execute(stmt) + session.commit() + return ret_channel