Giter Club home page Giter Club logo

discordbot_gamestatus's Introduction

DiscordBot_GameStatus

This is an updated/modified version of https://github.com/Ramzi-Sah/game-status-discordbot-selfhosted

  • Fixed gamedig parsing (rank, name, time, score, ping)
  • Fixed embed formatting
  • Fixed pathing to graph
  • Added additional options to config.json
  • Added sorting by score or ping
  • Added header padding length option (regardless, headers will no longer wrap around)
  • Fixed 'rank' to always sort from '01' onward regardless of sort option chosen
  • Fixed time parsing to make sure it's a valid number
  • Many other code changes/fixes/refactoring
  • Added multiple instances (config entry)

##How to install?

Windows...

  1. Make sure node.js is installed on the system (https://nodejs.org)
  2. Unpack the files to a directory of your choice.
  3. Open a cmd terminal and change directory to the unpacked files.
  4. In the cmd terminal, type -> npm install
  5. Configure your config.json file with your settings.
  6. To launch the bot, type -> bot.bat (or node index.js)

Note, for the in built http server to function (graph enabled), it needs to be accessible remotely (eg, allowed via firewall + port forwarding)

Now with the addition of multiple instances, first launch the bot with all "serverStatusMessageID" entries as "". The console window will output what to paste in the config.json once the message ID is returned. Once your config.json is updated and saved, close the bot and relaunch it.

discordbot_gamestatus's People

Contributors

soulkobk avatar

Stargazers

Muhammad Ari Al Ghifari avatar  avatar Бизак avatar  avatar The Skull Corporation avatar

Watchers

 avatar Muhammad Ari Al Ghifari avatar  avatar

discordbot_gamestatus's Issues

errors in console when server is offline

I updated to the latest version and now a serie of errors pop up when the server is offline. That didn't happen before

error 1: Error: Failed all 10 attempts
at QueryRunner.run (/home/container/node_modules/gamedig/lib/QueryRunner.js:95:21)
at async Gamedig.query (/home/container/node_modules/gamedig/lib/index.js:11:16)
at async Function.query (/home/container/node_modules/gamedig/lib/index.js:19:16)
at async startStatusMessage (/home/container/src/bot.js:193:16)
Attempt #1 - Port=27132 Retry=0:
Error: UDP - Timed out after 1000ms
at Timeout.<anonymous> (/home/container/node_modules/gamedig/lib/Promises.js:7:25)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
Attempt #2 - Port=27132 Retry=1:
Error: UDP - Timed out after 1000ms
at Timeout.<anonymous> (/home/container/node_modules/gamedig/lib/Promises.js:7:25)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
Attempt #3 - Port=27132 Retry=2:
Error: UDP - Timed out after 1000ms
at Timeout.<anonymous> (/home/container/node_modules/gamedig/lib/Promises.js:7:25)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
Attempt #4 - Port=27132 Retry=3:
Error: UDP - Timed out after 1000ms
at Timeout.<anonymous> (/home/container/node_modules/gamedig/lib/Promises.js:7:25)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
Attempt #5 - Port=27132 Retry=4:
Error: UDP - Timed out after 1000ms
at Timeout.<anonymous> (/home/container/node_modules/gamedig/lib/Promises.js:7:25)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
Attempt #6 - Port=27131 Retry=0:
Error: UDP - Timed out after 1000ms
at Timeout.<anonymous> (/home/container/node_modules/gamedig/lib/Promises.js:7:25)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
Attempt #7 - Port=27131 Retry=1:
Error: UDP - Timed out after 1000ms
at Timeout.<anonymous> (/home/container/node_modules/gamedig/lib/Promises.js:7:25)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
Attempt #8 - Port=27131 Retry=2:
Error: UDP - Timed out after 1000ms
at Timeout.<anonymous> (/home/container/node_modules/gamedig/lib/Promises.js:7:25)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
Attempt #9 - Port=27131 Retry=3:
Error: UDP - Timed out after 1000ms
at Timeout.<anonymous> (/home/container/node_modules/gamedig/lib/Promises.js:7:25)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
Attempt #10 - Port=27131 Retry=4:
Error: UDP - Timed out after 1000ms
at Timeout.<anonymous> (/home/container/node_modules/gamedig/lib/Promises.js:7:25)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)

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.