Skip to content

Commit

Permalink
Commit changes from server
Browse files Browse the repository at this point in the history
  • Loading branch information
trickeydan committed Nov 29, 2023
1 parent 4f2b9e3 commit 4d71971
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions kmibot/modules/ferry/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,12 @@ def parse_message_as_accusation(self, message: discord.Message) -> Optional[Accu

async def get_ferry_counts(self) -> FerryCounts:
last_message_id = self.ferry_module.accuse_channel.last_message_id
ferry_counts = {}
if last_message_id:
last_message = await self.ferry_module.accuse_channel.fetch_message(last_message_id)
ferry_counts: FerryCounts = {}
if last_message_id is not None:
try:
last_message = await self.ferry_module.accuse_channel.fetch_message(last_message_id)
except discord.errors.NotFound:
return ferry_counts
if last_message.content.startswith("Bad people:"):
ferry_counts = await self.parse_emoji_message(last_message)
return ferry_counts
Expand Down

0 comments on commit 4d71971

Please sign in to comment.