Discord bot providing answers to questions
This is a work in progress and not ready for general use. Message me if you'd like to try it out. There is a very limited number of servers allowed at this time.
Send Messages - Allows the bot to send messages to the channel.
Embed Links - Allows the bot to reply to ask commands with a nicer formatted answer.
Manage Messages - Allows the bot to remove the original ask question when replying with an answer, reducing clutter.
The oracle works off of lists of entries. It is up to the server owners to create and manage the lists. Each server can have multiple lists. Once the lists are created, then the oracle can be asked questions from those lists.
When the bot is first added to the server, the following 3 lists are added.
Odds - Even | Odds - Unlikely | Odds - Likely |
---|---|---|
No, and complication | No, and complication | No |
No | No | No, but benefit |
No, but benefit | No | Yes, but complication |
Yes, but complication | No, but benefit | Yes |
Yes | Yes, but complication | Yes |
Yes, and benefit | Yes | Yes, and benefit |
You can change these lists to suit your needs, or remove them from the oracle (see below).
- Only server owners can add, edit, or remove lists.
- Anyone can view lists or ask the oracle questions.
- List names can only be 50 characters long. Anything longer than 50 characters is automatically shortened to 50.
- Entries can be up to 100 characters long. Anything longer than 100 characters is automatically shortened to 100.
- Currently, there isn't a limit to the number of lists allowed on a server. Add too many, and it will be difficult to use.
- Duplicate entries can be added to a list, however, entries are removed by name. In the examples above, removing No from a list will remove ALL No entries.
- Think beyond question/answer interactions. This works great for any random table.
- Name lists so they are grouped together. Lists are always displayed in alphabetical order.
- After adding the list, use the assigned number to interact with it and save typing. This makes it much easier to use on a phone.
There are two ways to talk to the oracle. Either of these will work
!oracle
!o
Here is an example of a list for asking how likely it is for something to happen:
even odds
---------
No
Yes
Here are the oracle commands to create this list:
!oracle add No to "even odds"
!oracle add Yes to "even odds"
Once the list is created, it will be assigned a number which can be used to referr to the list, saving typing.
Here are the two commands to ask questions of the list and sample answers:
!oracle ask "even odds"
@user, the answer is: "Yes"
!oracle ask "even odds" "Will it snow today?"
@user asked: "Will it snow today?". The answer is: "Yes".
!o ask 1 "Will it snow today?"
To display all lists for the server:
!oracle display
!oracle list
!o list
To display all entries in a list:
!oracle display "[list name]"
e.g. !oracle display "even odds"
!oracle list "[list name]"
e.g. !oracle list "even odds"
!o list 1
To display a list of available filters:
!o filter
To filter the lists down to only those that start with part of a name:
!o filter "[name]"
e.g. !oracle filter "character"
To rename a list:
!oracle rename "[list name]" to "[new list name]"
e.g. !oracle rename "even odds" to "Odds - Even"
!o rename 1 to "Odds - Even"
To remove an answer from a list:
!oracle remove "[answer]" from "[list name]"
e.g. !oracle remove Yes from "even odds"
!o remove Yes from 1
To remove a list from the server:
!oracle remove "[list name]"
e.g. !oracle remove "even odds"
!o remove 1
To renumber the lists:
!oracle renumber
!o renumber
- Clone the repository
- Make the data and logs directories
- Create a bot in Discord and copy the token
- Make the .env file
- Add the following to the .env file:
BOT_TOKEN="[Paste Discord Bot Token Here]"
- Run docker-compose up