Skip to content

add !qotd commands #243

@weslayer

Description

@weslayer

admins manage a question queue via s!qotd subcommands, and the bot automatically posts the next question to a configured channel every day at 8am.

questions should be stored in SQLite and move to a "past questions" table once posted

things that need to be added:

  • s!qotd add <question> -- append a question to the back of the queue
  • s!qotd priority <question> -- add a question to the front of the queue
  • s!qotd remove <id> -- remove a question by ID
  • s!qotd list -- view the current queue
  • s!qotd past -- view previously posted questions
  • cron job that removes the first question from the queue and adds it to the past questions table
s!qotd list
> [Embed: "QOTD Queue (3 questions)"]
>  #1 (ID 4) — What's your favorite IDE?
>  #2 (ID 5) — Tabs or spaces?
>  #3 (ID 6) — What got you into CS?

s!qotd past
> [Embed: "Past QOTDs"]
>  03/14 — what's your favorite language? (added by cindy)
>  03/13 — Vim or Emacs? (added by cindy)

MAKE SURE NOT TO USE THIS COMMAND IN BOT-COMMANDS CHANNEL THEN IT WOULD NOT BE GOOD

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions