1
0
Ответвление 0
зеркало из https://github.com/aydenjahola/discord-multipurpose-bot.git синхронизирован 2025-07-15 17:17:07 +01:00
Этот коммит содержится в:
Ayden Jahola 2024-09-10 12:30:08 +01:00
родитель 32689b1e6a
коммит 06a477adbb
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 71DD90AE4AE92742

Просмотреть файл

@ -4,6 +4,8 @@ const { decode } = require("html-entities");
const TriviaQuestion = require("../../models/TriviaQuestion"); const TriviaQuestion = require("../../models/TriviaQuestion");
const Leaderboard = require("../../models/Leaderboard"); const Leaderboard = require("../../models/Leaderboard");
// WARNING: this code is by means not perfect, and it might have questionable implementation but its still a good starting point and under development. feel free to suggest improvements.
const API_INTERVAL = 5000; // 5 seconds const API_INTERVAL = 5000; // 5 seconds
const QUESTION_EXPIRY = 30 * 24 * 60 * 60 * 1000; // 1 month const QUESTION_EXPIRY = 30 * 24 * 60 * 60 * 1000; // 1 month
const ACTIVE_GAMES = new Set(); // Track users with ongoing trivia const ACTIVE_GAMES = new Set(); // Track users with ongoing trivia