Midnight-Cafe / lacus

Moderation bot
1 stars 4 forks source link

Add functionality to send question prompts at a certain frequency #6

Closed pk400 closed 3 years ago

pk400 commented 3 years ago

Description

The idea is that Lacus can send questions at a specified frequency (daily, weekly, etc.) to a specific channel.

Acceptance Criteria

pk400 commented 3 years ago

As per the comment in discord, let's keep the scheduled messages stored in a JSON file in the codebase. We can move this over to the database once we have that configured, but let's keep it simple for now.

For example our JSON file could look like:

{
  "prompts": [
    {
      "type": "poll",
      "message": "What programming languages are you currently working with",
      "options": [
        <emoji_id_1>,
        <emoji_id_2>,
        <emoji_id_3>,
      ]
    },
    {
      "type": "question",
      "message": "
    }
  ]
}

Just to lessen the scope, we can assume that the only type of prompt we will be receiving for now is a "question" type.

TheMorrisGitHub commented 3 years ago

Ok, I remember in the last meeting we said something related to "This questions would encourage participation and talk between the group", just to bear in mind when the setup the questions.

pk400 commented 3 years ago

We're close with this one. Just need to figure out the format for the messages.json not sure if we should determine frequency by seconds now that I think about it. Maybe we don't need a frequency? Ideally any message of type question can be picked at random to be sent in the specific channel.