2022-11-16 13:53:42 -05:00
import Discord , { SlashCommandBuilder } from 'discord.js' ;
2022-11-13 19:18:15 -05:00
import { TClient } from 'src/client' ;
export default {
2022-11-16 13:53:42 -05:00
async run ( client : TClient , interaction : Discord.ChatInputCommandInteraction < 'cached' > ) {
if ( ! client . config . eval . whitelist . includes ( interaction . user . id ) ) return client . youNeedRole ( interaction , 'bottech' ) ;
2022-11-13 19:18:15 -05:00
( 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' ] } )
2022-11-16 13:53:42 -05:00
await interaction . reply ( 'It has been uploaded to dev server.' )
2022-11-13 19:18:15 -05:00
} ,
2022-11-16 13:53:42 -05:00
data : new SlashCommandBuilder ( )
. setName ( 'botlog' )
. setDescription ( 'Retrieves the log from host and sends it to appropriate channel.' )
2022-11-13 19:18:15 -05:00
}