mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
This commit is contained in:
parent
c23765e1a3
commit
636d4968c5
@ -107,10 +107,7 @@ 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: ()=>{
|
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}\``)),
|
||||||
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)=>{
|
||||||
|
Loading…
Reference in New Issue
Block a user