Store updated channel id.

This commit is contained in:
2024-05-15 14:15:11 -04:00
parent 52ee85f17c
commit 5726875c59
+9 -1
View File
@@ -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