3.0.2 • Published 2 months ago

discord-trivia v3.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

Discord Trivia Logo

Discord Trivia

A package that provides an easy way to create fully-fledged trivia games for Discord bots with Discord.JS. Includes support for +20 categories as well as customizable game settings, themes, and game messages. Comes with a built-in leaderboard system to track scores and rankings!

CHANGELOG

3.0.2

  • Additional bug fixes to answer checking.

Basic Example

import { GameManager } from 'discord-trivia';

const manager = new GameManager();

// -- Inside your command function --
const game = manager.createGame(interaction.channel);

try {
    await game.startQueue(interaction);
} catch (err) {
    console.error(`An error occurred: ${err}`);
}

Custom Questions

const customQuestions = [
  new BooleanQuestion()
    .setValue("discord-trivia is awesome!")
    .setCategory("My epic category")
    .setDifficulty('easy') 
    .setCorrectAnswer('true'),
  new MultipleChoiceQuestion()
    .setValue("What's the best pizza topping?")
    .setCategory("food")
    .setDifficulty('medium')
    .setCorrectAnswer("Chicken feet")
    .setIncorrectAnswers(["Pepperoni", "Sausage", "Olives"])

  // Add more custom questions here...
];

game.config.customQuestions = customQuestions;

game.startQueue(interaction);

Full Guide

Click here to view the full guide

3.0.2

2 months ago

3.0.1

2 months ago

3.0.0

3 months ago

2.0.3

11 months ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.2.0

2 years ago

1.1.0

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago