Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less frequent autoposting #313

Merged
merged 1 commit into from
Jul 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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