Skip to content

Commit

Permalink
Merge pull request #313 from StampyAI/less-frequent-autopost-hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ProducerMatt authored Jul 2, 2023
2 parents 2f95b03 + 72974f5 commit 0f5e3be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def __init__(self) -> None:
###################

# How often Stampy posts random not started questions to `#general`
self.not_started_question_autopost_interval = timedelta(hours=6)
self.not_started_question_autopost_interval = timedelta(hours=24)

# Time of last (attempted) autopost of not started question
self.last_not_started_autopost_attempt_dt = (
Expand Down Expand Up @@ -363,7 +363,7 @@ async def last_msg_in_general_was_autoposted(self) -> bool:
channel = cast(
TextChannel, self.utils.client.get_channel(int(general_channel_id))
)
async for msg in channel.history(limit=1):
async for msg in channel.history(limit=20):
if msg.content.startswith(self.AUTOPOST_NOT_STARTED_MSG_PREFIX):
return True
return False
Expand Down

0 comments on commit 0f5e3be

Please sign in to comment.