mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Compare commits
3 Commits
62576aab16
...
7cb1e5cc47
Author | SHA1 | Date | |
---|---|---|---|
|
7cb1e5cc47 | ||
|
636d4968c5 | ||
|
c23765e1a3 |
@ -107,10 +107,7 @@ export default {
|
||||
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()}***`)
|
||||
},
|
||||
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}\``))
|
||||
},
|
||||
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}\``)),
|
||||
restart: async()=>{
|
||||
const i = await interaction.reply({content: 'Compiling TypeScript files...', fetchReply: true});
|
||||
exec('yarn tsc',{windowsHide:true},(err:Error)=>{
|
||||
|
@ -47,7 +47,7 @@ export default {
|
||||
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})
|
||||
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 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.
|
||||
|
@ -25,7 +25,7 @@ export default async(client:TClient, Channel:string, Message:string, Server:TSer
|
||||
|
||||
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 && !hitCSG.slotSystem) return msg.edit({content: 'No savegame found or autosave has ran.', embeds: [genericEmbed.setColor(client.config.embedColorOrange).setImage(noContentImage)]});
|
||||
if (hitDSS && !hitCSG) 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]});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user