mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-26 15:45:38 -05:00
Dag seems to be using different server for survival challenge.
This commit is contained in:
parent
97e5106d89
commit
051cb34fe4
@ -87,7 +87,6 @@ export default async(client:TClient,Channel:string,Message:string,ServerName:str
|
|||||||
|
|
||||||
ServerName = client.MPServerCache.name;
|
ServerName = client.MPServerCache.name;
|
||||||
if (DSS.data.server.name === 'Official Daggerwin Game Server') client.MPServerCache.name = 'Daggerwin';
|
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){
|
if (DSS.data.server.name.length === 0){
|
||||||
embed.setTitle('The server seems to be offline.').setColor(client.config.embedColorRed);
|
embed.setTitle('The server seems to be offline.').setColor(client.config.embedColorRed);
|
||||||
|
@ -99,7 +99,7 @@ export default class TClient extends Client {
|
|||||||
waitQueueTimeoutMS: 50000,
|
waitQueueTimeoutMS: 50000,
|
||||||
socketTimeoutMS: 30000,
|
socketTimeoutMS: 30000,
|
||||||
family: 4
|
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);
|
this.login(this.tokens.main);
|
||||||
for await (const file of readdirSync('dist/events')){
|
for await (const file of readdirSync('dist/events')){
|
||||||
const eventFile = await import(`./events/${file}`);
|
const eventFile = await import(`./events/${file}`);
|
||||||
|
@ -5,7 +5,6 @@ import {exec} from 'node:child_process';
|
|||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import util from 'node:util';
|
import util from 'node:util';
|
||||||
import TClient from '../client.js';
|
import TClient from '../client.js';
|
||||||
import path from 'node:path';
|
|
||||||
const removeUsername = (text: string)=>{
|
const removeUsername = (text: string)=>{
|
||||||
let matchesLeft = true;
|
let matchesLeft = true;
|
||||||
const array = text.split('\\');
|
const array = text.split('\\');
|
||||||
|
@ -25,7 +25,7 @@ async function MPdata(client:TClient, interaction:Discord.ChatInputCommandIntera
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
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));
|
interaction.reply(`Please use <#739084625862852715> for \`/mp status/players\` commands to prevent clutter in this channel.`).then(msg=>setTimeout(()=>interaction.deleteReply(), 6000));
|
||||||
return;
|
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')}`)
|
if (Url.ip && Url.code) return interaction.reply(`${Url.get('ip')}`+'/feed/dedicated-server-stats.json?code='+`${Url.get('code')}`)
|
||||||
} catch(err){
|
} catch(err){
|
||||||
console.log(`MPDB :: ${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{
|
}else{
|
||||||
if (!address.match(/dedicated-server-stats/)) return interaction.reply('The URL does not match `dedicated-server-stats.xml`');
|
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')))
|
.setDescription('Insert a \'dedicated-server-stats\' URL')))
|
||||||
.addSubcommand(x=>x
|
.addSubcommand(x=>x
|
||||||
.setName('maintenance')
|
.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
|
.addStringOption(x=>x
|
||||||
.setName('message')
|
.setName('message')
|
||||||
.setDescription('The reason why is the server unavailable for?')
|
.setDescription('The reason why is the server unavailable for?')
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"botPresence": {
|
"botPresence": {
|
||||||
"activities": [
|
"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"
|
"status": "online"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user