GitXplorerGitXplorer
v

quizmaster

public
1 stars
0 forks
1 issues

Commits

List of commits on branch main.
Verified
4aa7b631706eebd64792d3456eaa8eeabe31c95f

env template example

vvivian-dai committed 4 years ago
Unverified
6f30c2c6a37e38cfd3d53ed5c2c518d2b94e8f1e

final shenanigans

vvivian-dai committed 4 years ago
Unverified
8bd421ec92506bd676e4ff1d46443a98591b8b17

more documentation

vvivian-dai committed 4 years ago
Unverified
8a59f8ad3b82d4dac20c9ad0ce650da1a72c932a

+1 documented class

vvivian-dai committed 4 years ago
Unverified
eac0303c5d3d31312e7e2abc853eccb5da5fd2b3

more info on deployment

vvivian-dai committed 4 years ago
Unverified
19017212456dd845082e00669f30739b1b306f57

update usage

vvivian-dai committed 4 years ago

README

The README file for this repository.

quizmaster

a discord quiz bot with customizable questions made for a friend

Usage

Uh I sure hope I'll never need to write this actually 😅
Definitely going to have to write up how to use this thing.

Environment Variables

Create a .env file and on separate lines, <VARIABLE_NAME>=<description>
I will operate under the assumption Discord and Google Sheets API knowledge are prereqs

Variable name Description
TOKEN Discord bot token
EMAIL Email for the Google Sheets service
PRIVATE_KEY Private key for the Google Sheets service. Note this should be in double quotes (")
SHEET_ID ID of the Google Sheet storing the custom trivia questions
ACCOUNT Name (username) of the account sponsoring being featured
LINK Link to the account being featured
PFP_LINK Link to the profile picture of the account being featured

Take a look at .env.template for an example

Contents of Spreadsheet

The spreadsheet has two tables:

Questions

Table to keep track of which trivia questions the bot can ask. All values in this table are kept in strings (question is a string, answer is a string, difficulty can be taken however you want, no precoded thing, topic can also be taken however).

Question Answer Difficulty Topic
q1 a1 d1 t1
....etc.

Users

Table to keep track of user scores based on Discord ID. All values of this table are integers (Discord user ID is a number, scores are kept in numbers)

Discord ID All Time Score Monthly Score Weekly Score Daily Score
id1 ats1 ms1 ws1 ds1
....etc.

Starting the Bot

To start the bot:

$ node index.js

TODO

  • [ ] finish the bot
    • [ ] Proper scoreboard function
    • [ ] Fix the background tasks (updating scores daily, weekly, etc.)
  • [X] properly document it one day
  • [X] write the usage section one day