From dac105dc540a05fc99815670d8ba15eb20f81a81 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Sun, 18 Jun 2023 02:37:58 +1000 Subject: [PATCH] Dag seems to be using different server for survival challenge. --- src/MPLoop.ts | 1 - src/client.ts | 2 +- src/commands/dev.ts | 1 - src/commands/mp.ts | 6 +++--- src/config.json | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/MPLoop.ts b/src/MPLoop.ts index 6032c36..7e231b8 100644 --- a/src/MPLoop.ts +++ b/src/MPLoop.ts @@ -87,7 +87,6 @@ export default async(client:TClient,Channel:string,Message:string,ServerName:str ServerName = client.MPServerCache.name; if (DSS.data.server.name === 'Official Daggerwin Game Server') client.MPServerCache.name = 'Daggerwin'; - else client.MPServerCache.name = 'Dag - YT Series'; if (DSS.data.server.name.length === 0){ embed.setTitle('The server seems to be offline.').setColor(client.config.embedColorRed); diff --git a/src/client.ts b/src/client.ts index 9d0f093..26df235 100644 --- a/src/client.ts +++ b/src/client.ts @@ -99,7 +99,7 @@ export default class TClient extends Client { waitQueueTimeoutMS: 50000, socketTimeoutMS: 30000, family: 4 - }).then(()=>console.log(this.logTime(), 'Successfully connected to MongoDB')).catch(err=>{console.error(this.logTime(), `Failed to connect to MongoDB\n${err.reason}`); exec('pm2 stop Daggerbot')}) + }).then(()=>console.log(this.logTime(), 'Successfully connected to MongoDB')).catch(err=>{console.error(this.logTime(), `Failed to connect to MongoDB\n${err}`); exec('pm2 stop Daggerbot')}) this.login(this.tokens.main); for await (const file of readdirSync('dist/events')){ const eventFile = await import(`./events/${file}`); diff --git a/src/commands/dev.ts b/src/commands/dev.ts index e1b0a60..6ba95ec 100644 --- a/src/commands/dev.ts +++ b/src/commands/dev.ts @@ -5,7 +5,6 @@ import {exec} from 'node:child_process'; import fs from 'node:fs'; import util from 'node:util'; import TClient from '../client.js'; -import path from 'node:path'; const removeUsername = (text: string)=>{ let matchesLeft = true; const array = text.split('\\'); diff --git a/src/commands/mp.ts b/src/commands/mp.ts index 28222e3..1cb70f9 100644 --- a/src/commands/mp.ts +++ b/src/commands/mp.ts @@ -25,7 +25,7 @@ async function MPdata(client:TClient, interaction:Discord.ChatInputCommandIntera export default { run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){ - if (interaction.channelId == '468835769092669461' && !client.isStaff(interaction.member) && ['status', 'players'].includes(interaction.options.getSubcommand())) { + if (interaction.channelId === '468835769092669461' && !client.isStaff(interaction.member) && ['status', 'players'].includes(interaction.options.getSubcommand())) { interaction.reply(`Please use <#739084625862852715> for \`/mp status/players\` commands to prevent clutter in this channel.`).then(msg=>setTimeout(()=>interaction.deleteReply(), 6000)); return; } @@ -76,7 +76,7 @@ export default { if (Url.ip && Url.code) return interaction.reply(`${Url.get('ip')}`+'/feed/dedicated-server-stats.json?code='+`${Url.get('code')}`) } catch(err){ console.log(`MPDB :: ${err}`); - interaction.reply('**Database error:**\nTry inserting an URL first.') + interaction.reply('**Database error:**\nThis server does not have the URL saved, try adding one.') } }else{ if (!address.match(/dedicated-server-stats/)) return interaction.reply('The URL does not match `dedicated-server-stats.xml`'); @@ -296,7 +296,7 @@ export default { .setDescription('Insert a \'dedicated-server-stats\' URL'))) .addSubcommand(x=>x .setName('maintenance') - .setDescription('Lock/unlock "#mp-active-players" channel when server is unavailable for few hours') + .setDescription('Lock/unlock "#mp-active-players" channel when server is unavailable to the public') .addStringOption(x=>x .setName('message') .setDescription('The reason why is the server unavailable for?') diff --git a/src/config.json b/src/config.json index dbd9b68..96187c2 100644 --- a/src/config.json +++ b/src/config.json @@ -26,7 +26,7 @@ }, "botPresence": { "activities": [ - {"name": "the tutorial", "url": "https://www.youtube.com/watch?v=c94bALAgENM", "type": 1} + {"name": "the banana factory", "url": "https://www.youtube.com/watch?v=zmHca1rW7B4", "type": 1} ], "status": "online" },