Skip to content

Commit 1add1bf

Browse files
Anonymous4045Ibrahim2750mi
authored andcommitted
Fix rerolled message in channels with specific topics
1 parent 4a2b741 commit 1add1bf

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

bot/exts/utilities/conversationstarters.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,13 @@ def _build_topic_embed(channel_id: int, previous_topic: None | str) -> discord.E
6767
embed.title = f"**{next(channel_topics)}**"
6868
else:
6969
# Message is being edited
70-
7170
try:
7271
channel_topics = TOPICS[channel_id]
7372
except KeyError:
7473
# Channel doesn't have any topics.
7574
new_topic = f"**{next(TOPICS['default'])}**"
7675
else:
77-
new_topic = f"\n**{next(channel_topics)}**"
76+
new_topic = f"**{next(channel_topics)}**"
7877

7978
total_topics = previous_topic.count("\n") + 1
8079

@@ -126,7 +125,7 @@ async def _listen_for_refresh(
126125
break
127126

128127
try:
129-
# The returned discord.Message object from discord.Message.edit is different than the current
128+
# The returned discord.Message object from discord.Message.edit is different from the current
130129
# discord.Message object, so it must be reassigned to update properly
131130
message = await message.edit(embed=self._build_topic_embed(message.channel.id, message.embeds[0].title))
132131
except discord.NotFound:

0 commit comments

Comments
 (0)