Discord Trivia Bot Versions Save

TriviaBot: Play trivia in Discord! Powered by discord.js and OpenTDB, with 24 categories and three modes of play.

v1.6.5

4 years ago

What's New

  • Updated to discord.js 11.6.2.
  • Updated trivia play <category> to identify category names more intelligently. Categories and inputs with or without ":" symbols or "&"/"and" are now recognized interchangeably.
  • Fixed mysterious extra spaces in the "trivia help" command that only show up on certain mobile versions of Discord.
  • Fixed the bot not detecting when it is @-mentioned for help.
  • Revised the connection error message for 'trivia categories'

Changes for self-hosted bots

  • Added additional warnings for the file database when questions are entered incorrectly. This should help narrow down erroneous questions on startup.
  • File database now detects if the "questions:" header is missing and displays an error accordingly.
  • Added a retry limit and an adjusted message cache size for the Discord client. This may help reduce memory usage of the application.
  • Shards now display a console message on death, disconnect, and reconnect.
  • Added a warning when shards close with a null exit code.
  • Added extra logging when the client disconnects.
  • "Failed to send message to channel. (no user)" errors now dump message data.
  • "Failed to send message to user [user]. (DM failed)" errors now dump message data.
  • Fixed "trivia ping" occasionally spawning an error if the message does not send.
  • "debug-log" now shows user IDs instead of names in scoring logs.

v1.6.4

4 years ago
  • Fixed file question database showing repeating questions in certain configurations.
  • File question database now exits with an error if the same category ID is referenced more than once.
  • Updated console messages for file database handling.
  • Renamed lib/evalCmds.js to eval_cmds.js

v1.6.3

4 years ago
  • Fixed "Cannot read property 'length' of undefined" errors related to the "command-whitelist" config option.

v1.6.2

4 years ago

What's New

  • Fixed answers not being accepted when using reaction mode in a direct message.
  • Fixed error when using "trivia play advanced" parameters and leaving out the channel.

Server-Side Changes

  • Users whitelisted under the "command-whitelist" option are now treated as moderators, regardless of their roles.
  • Updated the example question database to work better with hangman games.
  • Revamped messages that show up when posting to bot listing websites.
  • Fixed advanced games not retaining their game-mode if another mode is enabled in config.json.
  • Updated js-yaml to 3.13.1
  • Updated discord.js to 11.5.1

v1.6.1

5 years ago
  • Fixed advanced games not automatically ending when players don't participate.

v1.6

5 years ago

What's New

  • Advanced games! This is a brand new feature that lets you start a customized game. With advanced games, you can specify the mode of play, question difficulty, question type, and channel that the game will start in. Advanced games have a handful of brand new modes to play in, with more coming soon!
  • Hangman-style games! Hangman mode can be activated by starting an advanced game.
  • Reaction mode! This is a mode that uses reactions instead of typed answers. It can be activated by starting an advanced game.
  • Updated line spacing for the "trivia help" command.
  • Scores are now formatted properly (For example, "1,000" instead of "1000")
  • The "trivia stop" command can now stop games in other channels by typing "trivia stop #channel"
  • "Missing Access" and "Missing Permissions" errors now display a more descriptive error messages.

Server-Side Changes

  • The bot now detects the termination signal on Linux systems and exits cleanly. This reduces the potential for unexpected side effects when running the bot as a service or using other external process management.
  • Added config option "auto-delete-answers" - The bot will automatically delete players' typed answers when enabled. Does nothing if reaction mode is turned on. Bot must have the "manage messages" permission enabled in order to use.
  • Added the config option "auto-delete-answers-timer" - This works with the above config option, allowing a time to be set for how long before answers are deleted. Time is in milliseconds, with 0 being as quickly as possible. Timer accuracy will vary based on network latency.
  • Added the config option "embed-color" - This changes the color of the bot's responses from its default blue color. Colors are accepted in the form of hex codes.
  • Added the config option "hangman-mode" - This forces hangman mode to be enabled by default, without the use of advanced games.
  • Added the config option "channel-whitelist" - If any channels are specified, the bot will only work in those channels. Can specify either a channel name or an ID. Example: "channel-whitelist": [ "trivia-dev", "trivia-dev2", "261705677943209984" ]
  • Added the config option "config-commands-enabled" - Enables commands that allow for configuring the bot. See the documentation for more information: https://LakeYS.net/triviabot/install.html#commandConfig
  • Added the config option "score-multiplier-max" - Allows for setting a bonus multiplier for questions. Bonuses are given based on how many other players get the question incorrect. Recommended
  • Fixed the "command-whitelist" option not working correctly if there are multiple users on the whitelist.
  • Fixed the bot ignoring the "prefix" option in certain messages.
  • Windows install.bat no-longer calls "npm update".
  • Config warnings now show below the ASCII art instead of above it.
  • Removed the unused "additional-config-passthrough" and "additional-manager-passthrough" options.
  • Reworked the "additional-packages" option.

NOTICE: Before installing this update, it is recommended that you update Node.js to the latest LTS version on your system.

v1.5.3

5 years ago

What's New

  • Fixed "trivia play advanced" showing up under the command list. (It is work-in-progress feature that is not available yet)

Server-Side Changes

  • Bot now logs when it posts to listing websites
  • Added support for discord.bots.gg
  • Responses are now shown when posting to listings
  • Listing errors now display the response
  • Removed the unused bots.discord.pw API
  • Removed the unused listcord API
  • Removed the unused discordbots.co.uk API
  • Fixed support for discordbots.group
  • Fixed listing errors showing the wrong site name
  • Fixed error when posting to botsfordiscord.com

v1.5.2

5 years ago

What's New

  • Fixed scores changing to "N/A" and resetting to 0.

Server-Side Changes

  • Custom question database now errors out when a question does not have a valid difficulty level specified. This fixes several possible instances of the N/A bug and the "Cannot read property 'toString' of undefined" error.
  • [e7af8a5] Fixed "Cannot read property 'toString' of undefined" causing the bot to stop without warning.
  • [5c2cbfa] Database query errors now log more detailed information in the console.
  • [d4770d5] YAML syntax errors (as well as other init errors) no-longer flood the console with raw data, making the errors much more human-readable.

v1.5.1

5 years ago

What's New

  • The bot now notifies when a game is about to automatically end. ("Game will end in x rounds if nobody participates")

Server-Side Changes

  • Added config option: database-merge. For use while using a custom file database, this option allows the use of both custom questions and OpenTDB questions at the same time.
  • Added config option: round-end-warnings-disabled, disables the "game will end if nobody participates" warnings.
  • Added config option: command-whitelist, allows for setting a whitelist of users that are can use commands.
  • Fixed custom DB questions with numbers as answers showing up blank.
  • Typing "npm start" now works in the bot's directory.
  • Added comments to the default file database.
  • Fixed console reading "File database loaded" when an error occurs.
  • File database errors now indicate which file caused the error.

See the Config Documentation for more information on the new configuration options.

v1.5.0

5 years ago

profile_2-1 5

New in 1.5

  • Added a new command: trivia ping. This comand allows users to test the latency of the bot,
  • [aa4ad3a] Fixed game breaking if there are too many players. Score lists now only show up to 32 players to prevent the bot from exceeding Discord's character limit.
  • [959fb65] Fixed game scoreboard reading plural "final scores" with only one score when game is force-ended between rounds.

Server-Side Changes

  • You can now create your own custom question sets! See here for instructions: http://lakeys.net/triviabot/install.html#customQuestions
  • At long last, the "Eval on index" issue has been fixed. The "allow-eval" option is now set to true by default.
  • Added config option: full-score-display. This option forces the bot to display the full scoreboard between each round, rather than the "condensed" version that shows only changed scores.
  • Uses of "trivia help", "trivia categories", "trivia stop" and "trivia ping" are now logged in stats.json.
  • Custom category rounds now log which category is used in stats.json.
  • Refactored game data to use less arrays.
  • Updated discord.js to 11.4.2
  • Updated circular-json to 0.5.9
  • [f97a949] The bot now exports games when a Discord client error occurs. This reduces cases of games stopping suddenly when an error occurs.

WARNING: Do not use the export command to carry game data over to this version.