mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 12:21:00 -05:00
mpstats test
This commit is contained in:
parent
04c2d1d3e6
commit
3546c0839b
@ -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;
|
||||||
|
@ -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
|
||||||
},
|
},
|
||||||
|
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user