Move the answers into the config instead of the code

This commit is contained in:
Oliver-Akins 2021-12-12 15:53:09 -06:00
parent d5e0b32adf
commit 84e8dd9aa2
3 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,7 @@
[quiz]
answers = []
[twitch]
[twitch.auth]
@ -8,6 +12,7 @@ username = ""
command_prefix = "!"
channels = []
[discord]
[discord.webhook]

View file

@ -1,7 +1,6 @@
import { Client } from "tmi.js";
import { readFileSync } from "fs";
import { Logger } from "tslog";
import * as tmi from "tmi.js";
const toml = require("toml");
var log = new Logger({
@ -32,7 +31,7 @@ export function reset_users() {
export var question_index = -1;
export var user_answers = {};
export var user_right_count = {};
export const correct_answers = [];
export const correct_answers = config.quiz.answers;
export var commands = {};

View file

@ -1,4 +1,7 @@
interface config {
quiz: {
answers: string[];
};
twitch: {
auth: {
oauth_token: string;