floriansw / discord-player-count-bot Goto Github PK
View Code? Open in Web Editor NEWA discord bot that publishes the player count of a game server in the status of the bot user.
License: MIT License
A discord bot that publishes the player count of a game server in the status of the bot user.
License: MIT License
I love this bot! Another great addition would be to add the battlemetics API to support games that do not talk with steam.
Bot cannot gather informations. Server is online and informations are provided by different other services.
PLAYER_COUNT_PROVIDER = steam-query
GAME_TYPE = dayz
GAME_QUERY_PORT = 2305
GAME_IP = MY-IPV4-SERVERADDRESS
Starting Discord Bot...
Logged in as ***bot#8811!
App setup done...
PollingProvider errored, retrying in 4 seconds for max 15 tries (1. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 6 seconds for max 15 tries (2. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 8 seconds for max 15 tries (3. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 10 seconds for max 15 tries (4. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 12 seconds for max 15 tries (5. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 14 seconds for max 15 tries (6. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 16 seconds for max 15 tries (7. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 18 seconds for max 15 tries (8. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 20 seconds for max 15 tries (9. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 22 seconds for max 15 tries (10. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 24 seconds for max 15 tries (11. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 26 seconds for max 15 tries (12. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 28 seconds for max 15 tries (13. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 30 seconds for max 15 tries (14. try). Error: Failed all 2 attempts
PollingProvider errored, retrying in 32 seconds for max 15 tries (15. try). Error: Failed all 2 attempts
When I'm using steam or steam-query and the server goes down for say a minute the bot quits and needs a manual restart. I have found a work around using nodemon but thought it might be a nice addition to add👍
Do you plan to publish Docker image on aarch64 architecture?
Hi, i see there is a battleye option in the env file as well, but this doesn't work yet. Any chance you can also get this option up and running please?
When the bot is started and, from the current observation, runs some hours (not sure how many), it errors out with the following error message:
Error in RCon connection: Error: Packet Overflow Occurred
The message occurs multiple times, which results in a log spam as well.
The bot could query this information from the CFTools API or it may be configured in the bot. It then should show when the server restarts next (relative time?).
See the CFTools feature request for the next restart time in the API: https://discord.com/channels/373098389174484992/701477631287361556/898897919007133737
When using CF Tools as the PLAYER_COUNT_PROVIDER. If the server is offline the bot does not refresh. It just shows the last known online as a status. Would be nice if it said the server was offline.
Thanks Florian for your amazing work
Hi there, I'm getting an error when attempting to run this bot.
`PS D:\Coding Projects\V Bot\Florian\discord-player-count-bot> npm start
[email protected] prestart
npm run build
[email protected] build
del-cli dist && tsc
[email protected] start
node ./dist/index.js
Starting Discord Bot...
(node:25824) [DEP0040] DeprecationWarning: The punycode
module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ...
to show where the warning was created)
Logged in as V Rising 1#4200!
./config/maps.json does not exist
App setup done...
PollingProvider errored, retrying in 4 seconds for max 15 tries (1. try). Error: Invalid game: v rising
PollingProvider errored, retrying in 6 seconds for max 15 tries (2. try). Error: Invalid game: v rising
App is shutting down on user event`
My .env file looks like this:
`PLAYER_COUNT_PROVIDER=steam-query
STEAM_API_TOKEN=C1...
GAME_ADDRESS=localhost
GAME_TYPE="v rising"
GAME_IP="127.0.0.1"
GAME_QUERY_PORT="27016"`
Any help would be appreciated, thankyou!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.