Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

discord-quiz

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-quiz

A package built ontop of Discord.js to make creating quiz commands much easier!

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Discord Quiz

An NPM package to help create simple quizzes for Discord bots. By SkyMocha.

NOTE: This package was originally built on v.11 and updated for v.12 so it may not work on versions beyond v.12 (my favorite version <3).If this doesn't fit your fancy, maybe try implementing a command to send Mastodon toots via Discord using tootcord. Consider supporting me by following me on Mastodon, YouTube (where I primarily do video-essays), TikTok or even supporting me on Patreon!

Installation

npm i discord-quiz

Usage

const Discord = require ('discord.js');
const dquiz = require ('discord-quiz');
const client = new Discord.Client();

// Adds a question to the pool of available questions
dquiz.add_question('When was the war of 1812?', '1812', ['1800', '2020', '777']);

client.on ('message', (message) => {
    if (message.content.toLowerCase().startsWith('!quiz'))
        dquiz.quiz(message, 10, 'ffb7c5'); // Runs the quiz command
}) 

client.login (<your token>);

Documentation

void add_question(String question, String correct_answer, String[] false_answers)

void quiz(Discord Message, Time in Seconds, Hex Code)

License

ISC

Keywords

FAQs

Package last updated on 24 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc