1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-12-29 05:35:38 -05:00

mpstats test

This commit is contained in:
AnxietyisReal 2022-11-22 21:33:29 +11:00
parent cb5063b1f3
commit 7d271eb9a6
3 changed files with 6 additions and 7 deletions

View File

@ -204,7 +204,6 @@ export class TClient extends Client {
const unpunishResult = await this.punishments.removePunishment(punishment.id, interaction.user.id, reason); const unpunishResult = await this.punishments.removePunishment(punishment.id, interaction.user.id, reason);
interaction.reply(unpunishResult) interaction.reply(unpunishResult)
} }
async YTLoop(YTChannelID: string, YTChannelName: string, DCChannelID: string){ async YTLoop(YTChannelID: string, YTChannelName: string, DCChannelID: string){
let Data:any; let Data:any;
let error; let error;

View File

@ -9,8 +9,8 @@
"registerCommands": true, "registerCommands": true,
"commands": false, "commands": false,
"logs": true, "logs": true,
"automod": true, "automod": false,
"mpstats": false, "mpstats": true,
"mpstatsDebug": false, "mpstatsDebug": false,
"autores": false "autores": false
}, },

View File

@ -9,7 +9,7 @@ import { Punishment, UserLevels } from './typings/interfaces';
client.on('ready', async()=>{ client.on('ready', async()=>{
client.guilds.cache.forEach(async(e: { members: { fetch: () => any; }; })=>{await e.members.fetch()}); client.guilds.cache.forEach(async(e: { members: { fetch: () => any; }; })=>{await e.members.fetch()});
setInterval(async()=>{ 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 // Playing: 0, Streaming (Requires YT/Twitch URL to work): 1, Listening to: 2, Watching: 3, Competing in: 5
}, 60000); }, 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}`)}) 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 // Daggerwin MP loop
setInterval(async()=>{ setInterval(async()=>{
if (!client.config.botSwitches.mpstats) return; 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(); const embed = new client.embed();
let Players = []; let Players = [];
let Server: any; let Server: any;
let CSG; let CSG: any;
let xmlData = undefined; let xmlData = undefined;
// Connect to DB to retrieve the Gameserver info to fetch data. // Connect to DB to retrieve the Gameserver info to fetch data.