mirror of
https://github.com/ApfelTeeSaft/Reload-Backend.git
synced 2026-08-26 19:33:26 +00:00
In-game players on discord status
This commit is contained in:
+2
-1
@@ -2,7 +2,8 @@
|
||||
"moderators": ["discordId", "discordId2"],
|
||||
"discord": {
|
||||
"bUseDiscordBot": true,
|
||||
"bot_token": ""
|
||||
"bot_token": "",
|
||||
"bEnableInGamePlayerCount": true
|
||||
},
|
||||
"mongodb": {
|
||||
"database": "mongodb://127.0.0.1/Reload"
|
||||
|
||||
@@ -35,6 +35,17 @@ client.once("ready", () => {
|
||||
}
|
||||
}
|
||||
|
||||
if (config.discord.bEnableInGamePlayerCount) {
|
||||
function updateBotStatus() {
|
||||
if (global.Clients && Array.isArray(global.Clients)) {
|
||||
client.user.setActivity(`${global.Clients.length} player(s)`, { type: "WATCHING" });
|
||||
}
|
||||
}
|
||||
|
||||
updateBotStatus();
|
||||
setInterval(updateBotStatus, 10000);
|
||||
}
|
||||
|
||||
let commands = client.application.commands;
|
||||
|
||||
const loadCommands = (dir) => {
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "reloadbackend",
|
||||
"version": "1.1.4",
|
||||
"version": "1.1.5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "reloadbackend",
|
||||
"version": "1.1.4",
|
||||
"version": "1.1.5",
|
||||
"license": "BSD-3-Clause license",
|
||||
"dependencies": {
|
||||
"axios": "^1.7.7",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "reloadbackend",
|
||||
"version": "1.1.4",
|
||||
"version": "1.1.5",
|
||||
"description": "Created by Burlone, This is a modded backend, all main backend credits to lawin",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user