Git Product home page Git Product logo

lakeys / discord-trivia-bot Goto Github PK

View Code? Open in Web Editor NEW
85.0 8.0 39.0 2.98 MB

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

Home Page: http://lakeys.net/triviabot/

License: Apache License 2.0

JavaScript 99.12% Batchfile 0.16% Shell 0.72%
discord discord-bot discord-js trivia opentdb bot anime manga television movies

discord-trivia-bot's Introduction

Metrics

discord-trivia-bot's People

Contributors

codacy-badger avatar dependabot[bot] avatar lakeys avatar max-programming avatar peterr-k avatar rotfuchs7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discord-trivia-bot's Issues

DiscordAPIError: Missing Permissions

This appears to occur when:

  • The bot does not have permission to send a message
  • The bot does not have the 'embed links' permission and attempts to send an embedded message. (See #25)

Detect when messages do not send

In some instances, the Discord client receives messages but does not appear to send any. This should be correctable by checking for the message object after calling 'send'.

See issue #39

Implement proper game system

Implement a proper game system that continues automatically rather than requiring manual commands to start another question

DiscordAPIError: Missing Access

Cause unknown, currently investigating.

Have found no information about error online. Only lead is that it appears to happen when the bot joins certain guilds.

EDIT: This also appears to occur when adding reactions to messages (guild text channels only, DMs work fine).

EDIT 2: This issue has been closed as no new occurrences have been recorded over multiple months.

EDIT 3 (Feb 2019): I managed to successfully replicate this by accident. I replicated it by attempting to send messages to a channel that exists, but the bot does not have "read messages" permissions for. I will add an error message explaining this to users that encounter the error.

Repeated Discord client 'ENOTFOUND' errors

In some instances, this can prevent the bot from logging in at all until restarted.

This may be correctable by restarting the client when there is a client error (rather than logging and ignoring it).

EDIT: Currently unable to replicate.

Auto-restart for Windows systems

Currently, run.sh auto-restarts the bot while run.bat does not. These files should be functionally identical.

Marked as critical as this negatively affects functionality for Windows systems. Must be fixed before making an initial release.

Add global stats

Stat recording should include total games played, guilds joined, and guilds left. Wherever possible, stats should be recorded on a monthly or weekly bases rather than as a lifetime total. The total weeks/months can be added up to determine an overall total for any given statistic.

A simple .json file should be sufficient to store this kind of data.

Game gets stuck in 'in progress' state with prev_participants as 'null', missing game information

Unknown cause

The 'prev_participants' value is set around line 108:
'prev_participants': game[id]!==undefined?game[id].participants:null

Example (channel and user IDs redacted):
{ '(redacted)': { inProgress: 1, participants: [], correct_users: [], correct_names: [], correct_times: [], prev_participants: null }, '(redacted)': { inProgress: 1, participants: [ '(redacted)' ], correct_users: [], correct_names: [], correct_times: [], prev_participants: null } }

EDIT: may be related to game messages not sending when users start a game
EDIT2: Confirmed still present in 6c3fae5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.