1.0.4 • Published 2 years ago

hubot-question-of-the-day v1.0.4

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
2 years ago

hubot-question-of-the-day

A hubot script that asks a question every day on a schedule.

Installation

In hubot project repo, run:

yarn add hubot-question-of-the-day --save

Then add hubot-question-of-the-day to your external-scripts.json:

[
  "hubot-question-of-the-day"
]

Setup

You can either use a json file to hold your environment variables or use .env

    "env": {
        "QOTD_CRON": "cron code",
        "QOTD_ROOM": "room ID"
        "QOTD_ADMIN_ROOM": "room ID"
    }

Environment Variables

QOTD_CRON

Use cron syntax https://github.com/ncb000gt/node-cron

If not set, defaults to "1 0 0 * * *" which is 12:00:01 am every day on the server local time.

QOTD_ROOM

Must be set for questions to be asked. If not set, no questions will be asked.

QOTD_ADMIN_ROOM

Only allow users to manage the QOTD bot from a single room that you can lock down with discord permissions. If not set, any user can manage the bot from any room, including direct message.

Commands

hubot add question

You can add one or multiple questions. Direct message or at-message your bot and then list all your questions prefaced with "add question". Every string after "add question" will be added as a question. example:

@hubot add question What's the weather going to be like today?
add question Are you a god?

hubot remove question

Use the question ID to remove it from the list.

hubot list question

Lists all the questions in a single message. If you have too many questions to list in a single message, will not reply.

hubot ask question

Ask a question NOW. Best used for testing or if the bot ran out of questions and you still need one asked today. Asking a question will not stop the bot from asking another question when the cron settings trigger again.

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago