1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-09-29 16:30:59 -04:00

Update botlog.ts

This commit is contained in:
Toast 2022-12-29 09:03:57 +11:00 committed by GitHub
parent fe81f12746
commit a5f2cdebb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,11 +3,11 @@ import { TClient } from 'src/client';
export default { export default {
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){ async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
if (!client.config.eval.whitelist.includes(interaction.user.id)) return client.youNeedRole(interaction, 'bottech'); if (!client.config.eval.whitelist.includes(interaction.user.id)) return client.youNeedRole(interaction, 'bottech');
(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: ['../.pm2/logs/Daggerbot-out.log']}) (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: ['../../.pm2/logs/Daggerbot-out.log']})
await interaction.reply('It has been uploaded to dev server.') await interaction.reply('It has been uploaded to dev server.')
}, },
data: new SlashCommandBuilder() data: new SlashCommandBuilder()
.setName('botlog') .setName('botlog')
.setDescription('Retrieves the log from host and sends it to development server.') .setDescription('Retrieves the log from host and sends it to development server.')
.setDMPermission(false) .setDMPermission(false)
} }