Skip to content

Instantly share code, notes, and snippets.

@jacoobes
Created August 26, 2022 17:31
Show Gist options
  • Save jacoobes/87521bbb46b968511f0003c74179409f to your computer and use it in GitHub Desktop.
Save jacoobes/87521bbb46b968511f0003c74179409f to your computer and use it in GitHub Desktop.
function publishedCommandModule(publishOptions: PublishOptions) {
return (
execute : (ctx: Context, args: ['slash', SlashOptions]) => unknown
) => commandModule({
type: CommandType.Slash,
plugins: [
publish(publishOptions)
],
execute
})
};
const MainServerCommand = publishedCommandModule({
guildIds: ['941002690211766332']
})
export default MainServerCommand(
(ctx) => {
ctx.reply({
embeds : [
new EmbedBuilder()
.setColor(Colors.Red)
.setTitle('Current server specs')
.addFields([
{ name: 'Threads', value : os.cpus().length.toString() },
{ name : 'CPU', value: os.cpus()[0].model },
{ name : 'Platform', value: process.platform },
{ name : 'Uptime', value: Math.floor(process.uptime() / 60 / 60).toString() + ' hours' }
])
]
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment