Skip to content

Commit

Permalink
Account for bot-devel's bot working for ffn again on ACI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachaa-Thanasius committed Nov 4, 2023
1 parent f84d28d commit 1e52de9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exts/ff_metadata/ff_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def on_posted_fanfic_link(self, message: discord.Message) -> None:
Must be triggered in an allowed channel.
"""

if (message.author == self.bot.user) or (not message.guild):
if (message.author == self.bot.user) or (not message.guild) or message.guild.id == self.aci100_id:
return

# Listen to the allowed channels in the allowed guilds for valid fanfic links.
Expand Down Expand Up @@ -301,7 +301,7 @@ async def get_ff_data_from_links(self, text: str, guild_id: int) -> AsyncGenerat
# Attempt to get the story data from whatever method.
if match_obj.lastgroup == "FFN":
story_data = await self.atlas_client.get_story_metadata(int(match_obj.group("ffn_id")))
elif match_obj.lastgroup == "AO3" and (guild_id != self.aci100_id):
elif match_obj.lastgroup == "AO3":
story_data = await self.search_ao3(match_obj.group(0))
elif match_obj.lastgroup and (match_obj.lastgroup != "AO3"):
story_data = await self.search_other(match_obj.group(0))
Expand Down

0 comments on commit 1e52de9

Please sign in to comment.