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

Automatically posting messages should happen only on Rob's Discord #272

Open
MatthewBaggins opened this issue Jun 3, 2023 · 2 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@MatthewBaggins
Copy link
Collaborator

MatthewBaggins commented Jun 3, 2023

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
Copy link
Member

Was this resolved @MatthewBaggins ?

@MatthewBaggins
Copy link
Collaborator Author

Was this resolved @MatthewBaggins ?

I don't think so

@MatthewBaggins MatthewBaggins self-assigned this Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

3 participants