Automatically posting messages should happen only on Rob's Discord
MatthewBaggins opened this issue · 2 comments
MatthewBaggins commented
Every six hours Stampy posts a random question to the #general
channel (unless the last question was also automatically posted this way)
We want to make Stampy flexibly deployable to other Discord servers and non-Discord platforms. In order to do that, we are currently dividing modules into a generic core and custom modules which are platform-specific.
Currently, this feature is in a generic questions.py
module, so probably it would be post to move it to a separate module
The code responsible for registering this functionality is in modules/questions.py
, lines 162-168
# Register `post_random_oldest_question` to be triggered every after 6 hours of no question posting
@self.utils.client.event
async def on_socket_event_type(event_type) -> None:
if (
self.last_posted_time < datetime.now() - self.AUTOPOST_QUESTION_INTERVAL
) and not self.last_question_autoposted:
await self.post_random_oldest_question(event_type)
ProducerMatt commented
Was this resolved @MatthewBaggins ?
MatthewBaggins commented
Was this resolved @MatthewBaggins ?
I don't think so