Skip to content

Commit

Permalink
Merge pull request #61 from rhliang/Fix58And59
Browse files Browse the repository at this point in the history
Close #58 and #59
  • Loading branch information
rhliang authored Jan 8, 2023
2 parents ae2e768 + 9b227ca commit ba9213a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
5 changes: 4 additions & 1 deletion bot/raid_fyi_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,10 @@ async def fyi(self, ctx):
interested_users_str=self.RELAY_MESSAGE_NONE_INTERESTED_YET
)

relay_message = await relay_channel.send(full_message_text)
relay_message = await relay_channel.send(
full_message_text,
allowed_mentions=discord.AllowedMentions.none(),
)
chat_relay_message_id = None
chat_relay_message = None
if fyi_info["relay_to_chat"]:
Expand Down
14 changes: 10 additions & 4 deletions bot/raid_fyi_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,13 +505,19 @@ def get_fyi_helper(
)
fyi_info = response.get("Item")

chat_channel = guild.get_channel(
int(
re.match(channel_message_pattern, fyi_info["config_channel_message"]).group(1)
)
chat_channel_id: int = int(
re.match(
channel_message_pattern,
fyi_info["config_channel_message"],
).group(1)
)
chat_channel = guild.get_channel(chat_channel_id)
if chat_channel is None:
chat_channel = MissingChannel(chat_channel_id)
command_message_id = int(re.match(channel_message_pattern, fyi_info["config_channel_message"]).group(2))
relay_channel = guild.get_channel(fyi_info["relay_channel_id"])
if relay_channel is None:
relay_channel = MissingChannel(fyi_info["relay_channel_id"])
relay_message_id = fyi_info["relay_message_id"]

timestamp = dateutil.parser.parse(fyi_info["timestamp"])
Expand Down

0 comments on commit ba9213a

Please sign in to comment.