mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 08:20:58 -05:00
Compare commits
No commits in common. "7cb1e5cc475126bee11cc9831d34f1faa6b040aa" and "62576aab1632ebbe94670e726393c7d0975c4d8c" have entirely different histories.
7cb1e5cc47
...
62576aab16
@ -107,7 +107,10 @@ export default {
|
|||||||
client.statsGraph = -(interaction.options.getInteger('number', true));
|
client.statsGraph = -(interaction.options.getInteger('number', true));
|
||||||
interaction.reply(`Successfully set to \`${client.statsGraph}\`\n*Total data points: **${JSON.parse(fs.readFileSync(`src/database/${interaction.options.getString('server')}PlayerData.json`, {encoding: 'utf8'})).length.toLocaleString()}***`)
|
interaction.reply(`Successfully set to \`${client.statsGraph}\`\n*Total data points: **${JSON.parse(fs.readFileSync(`src/database/${interaction.options.getString('server')}PlayerData.json`, {encoding: 'utf8'})).length.toLocaleString()}***`)
|
||||||
},
|
},
|
||||||
logs: ()=>(client.channels.resolve(client.config.mainServer.channels.console) as Discord.TextChannel).send({content: `Uploaded the current console dump as of <t:${Math.round(Date.now()/1000)}:R>`, files: [`${process.env.pm2_home}/logs/Daggerbot-out.log`, `${process.env.pm2_home}/logs/Daggerbot-error.log`]}).then(()=>interaction.reply('It has been uploaded to dev server.')).catch((e:Error)=>interaction.reply(`\`${e.message}\``)),
|
logs: ()=>{
|
||||||
|
interaction.deferReply();
|
||||||
|
(client.channels.resolve(client.config.mainServer.channels.console) as Discord.TextChannel).send({content: `Uploaded the current console dump as of <t:${Math.round(Date.now()/1000)}:R>`, files: [`${process.env.pm2_home}/logs/Daggerbot-out.log`, `${process.env.pm2_home}/logs/Daggerbot-error.log`]}).then(()=>interaction.editReply('It has been uploaded to dev server.')).catch((e:Error)=>interaction.editReply(`\`${e.message}\``))
|
||||||
|
},
|
||||||
restart: async()=>{
|
restart: async()=>{
|
||||||
const i = await interaction.reply({content: 'Compiling TypeScript files...', fetchReply: true});
|
const i = await interaction.reply({content: 'Compiling TypeScript files...', fetchReply: true});
|
||||||
exec('yarn tsc',{windowsHide:true},(err:Error)=>{
|
exec('yarn tsc',{windowsHide:true},(err:Error)=>{
|
||||||
|
@ -47,7 +47,7 @@ export default {
|
|||||||
if (!presence) embed.addFields({name: `🔹 Status: ⚫`, value: '\u200b'})
|
if (!presence) embed.addFields({name: `🔹 Status: ⚫`, value: '\u200b'})
|
||||||
if (member.presence) embed.addFields({name: `🔹 Status:`, value: `${member.presence.status === 'offline' ? '⚫' : `Desktop: ${convert(presence.desktop)}\nWeb: ${convert(presence.web)}\nMobile: ${convert(presence.mobile)}`}`, inline: true})
|
if (member.presence) embed.addFields({name: `🔹 Status:`, value: `${member.presence.status === 'offline' ? '⚫' : `Desktop: ${convert(presence.desktop)}\nWeb: ${convert(presence.web)}\nMobile: ${convert(presence.mobile)}`}`, inline: true})
|
||||||
embedArray.push(embed)
|
embedArray.push(embed)
|
||||||
if (member.presence?.activities.find(a=>a.type === 2)) {
|
if (member.presence.activities.find(a=>a.type === 2)) {
|
||||||
const spotifyStatus = member.presence?.activities.find(a=>a.name === 'Spotify') as Discord.Activity;
|
const spotifyStatus = member.presence?.activities.find(a=>a.name === 'Spotify') as Discord.Activity;
|
||||||
const spotifyEmbed = new client.embed()
|
const spotifyEmbed = new client.embed()
|
||||||
.setColor('#1DB954') // Thanks Copilot, I never knew I needed this shade of green. It's actually looks like Spotify's color.
|
.setColor('#1DB954') // Thanks Copilot, I never knew I needed this shade of green. It's actually looks like Spotify's color.
|
||||||
|
@ -25,7 +25,7 @@ export default async(client:TClient, Channel:string, Message:string, Server:TSer
|
|||||||
|
|
||||||
if (!hitDSS ?? !hitCSG){
|
if (!hitDSS ?? !hitCSG){
|
||||||
if (hitDSS && !hitDSS.slots) return console.log(LogPrefix('MPModule'), `DSS failed with unknown slots table for ${client.MPServerCache[ServerName].name}`);
|
if (hitDSS && !hitDSS.slots) return console.log(LogPrefix('MPModule'), `DSS failed with unknown slots table for ${client.MPServerCache[ServerName].name}`);
|
||||||
if (hitDSS && !hitCSG) return msg.edit({content: 'No savegame found or autosave has ran.', embeds: [genericEmbed.setColor(client.config.embedColorOrange).setImage(noContentImage)]});
|
if (hitDSS && !hitCSG.slotSystem) return msg.edit({content: 'No savegame found or autosave has ran.', embeds: [genericEmbed.setColor(client.config.embedColorOrange).setImage(noContentImage)]});
|
||||||
else return msg.edit({embeds: [serverErrorEmbed]});
|
else return msg.edit({embeds: [serverErrorEmbed]});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user