Created
August 26, 2022 17:31
-
-
Save jacoobes/87521bbb46b968511f0003c74179409f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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