From 3546c0839be5b3ee46faad4c28dba80a316349ca Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Tue, 22 Nov 2022 21:33:29 +1100 Subject: [PATCH] mpstats test --- src/client.ts | 1 - src/config.json | 4 ++-- src/index.ts | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/client.ts b/src/client.ts index be5b075..1923592 100644 --- a/src/client.ts +++ b/src/client.ts @@ -204,7 +204,6 @@ export class TClient extends Client { const unpunishResult = await this.punishments.removePunishment(punishment.id, interaction.user.id, reason); interaction.reply(unpunishResult) } - async YTLoop(YTChannelID: string, YTChannelName: string, DCChannelID: string){ let Data:any; let error; diff --git a/src/config.json b/src/config.json index 6a0d559..0d19b20 100644 --- a/src/config.json +++ b/src/config.json @@ -9,8 +9,8 @@ "registerCommands": true, "commands": false, "logs": true, - "automod": true, - "mpstats": false, + "automod": false, + "mpstats": true, "mpstatsDebug": false, "autores": false }, diff --git a/src/index.ts b/src/index.ts index 8ddd0bd..0d9075b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,12 +4,12 @@ const client = new TClient; client.init(); import fs from 'node:fs'; import MPDB from './models/MPServer'; -import { Punishment, UserLevels } from './typings/interfaces'; +import {Punishment, UserLevels} from './typings/interfaces'; client.on('ready', async()=>{ client.guilds.cache.forEach(async(e: { members: { fetch: () => any; }; })=>{await e.members.fetch()}); setInterval(async()=>{ - client.user.setPresence({activities: [{ name: 'Slash commands!', type: 0 }], status: 'online'}); + client.user.setPresence({activities: [{ name: 'Slash commands!', type: 1, url: 'https://www.youtube.com/watch?v=eO9YZsJmjlM' }], status: 'online'}); // Playing: 0, Streaming (Requires YT/Twitch URL to work): 1, Listening to: 2, Watching: 3, Competing in: 5 }, 60000); if (client.config.botSwitches.registerCommands) (client.guilds.cache.get(client.config.mainServer.id) as Discord.Guild).commands.set(client.registry).catch((e)=>{console.log(`Couldn't register slash commands: ${e}`)}) @@ -50,11 +50,11 @@ process.on('error', async(error: Error)=>{ // Daggerwin MP loop setInterval(async()=>{ if (!client.config.botSwitches.mpstats) return; - const msg = await (client.channels.resolve('904192878140608563') as Discord.TextChannel).messages.fetch('1042835699906400346') + const msg = await (client.channels.resolve('904192878140608563') as Discord.TextChannel).messages.fetch('1044552089340219422') const embed = new client.embed(); let Players = []; let Server: any; - let CSG; + let CSG: any; let xmlData = undefined; // Connect to DB to retrieve the Gameserver info to fetch data.