From f0fe76df4dbdcc7c2f0a6f819313bbb14fe7d016 Mon Sep 17 00:00:00 2001 From: Expand-sys Date: Thu, 8 Feb 2024 20:42:43 +1100 Subject: [PATCH] beans --- events/client/ready.js | 10 +++++----- index.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/events/client/ready.js b/events/client/ready.js index 4a7bb5f..1aa7bcc 100644 --- a/events/client/ready.js +++ b/events/client/ready.js @@ -4,7 +4,7 @@ const fs = require('fs'); const { promisify } = require('util'); const { glob } = require('glob'); const PG = promisify(glob); -const dig = require("gamedig") +import { GameDig } from gamedig const path = require('path'); const { channelSend } = require('../../utils/utils'); @@ -42,7 +42,7 @@ module.exports = { function runevery30seconds(i) { setTimeout(() => { - dig.query({ + GameDig.query({ type: 'minecraft', host: process.env.MCHOST, port: process.env.MCHOSTPORT, @@ -56,11 +56,11 @@ module.exports = { restarted = 0; count +=1 //this will be where i do the tracking logic for how long people have been on the server - if(count == 6){ + /*if(count == 6){ await dbclient.connect() //let ping = await dbclient.db("timetracking").command({ ping: 1}) //console.log(ping) - let collection = await dbclient.db("timetracking").collection("times") + //let collection = await dbclient.db("timetracking").collection("times") for(i = 0; i < state.players.length; i++){ const query = { name: `${state.players[i].name}`} const update = { $inc: { time: 1 }} @@ -70,7 +70,7 @@ module.exports = { } await dbclient.close() count = 0 - } + }*/ }).catch(async (error) => { console.log("Server is offline " + error); diff --git a/index.js b/index.js index ff2b251..8e27f4d 100644 --- a/index.js +++ b/index.js @@ -35,7 +35,7 @@ process.on('SIGINT', (code) => { module.exports = { client, - dbclient + //dbclient } client.login(process.env.BOT_TOKEN); \ No newline at end of file