Skip to content

Commit 57cbe9b

Browse files
committed
ADD: new options to uptime
1 parent 41f1b5d commit 57cbe9b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

interactions/global/uptime.ts

+32
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { EmbedBuilder } from 'discord.js'
2+
import project from '../../package.json'
23
import { DiscordChatInputCommandInteraction, DiscordClient, DiscordSlashCommandBuilder } from '../../types/customTypes'
4+
const os = require('os')
5+
const newLocal = 'child_process'
6+
const latest_commit = require(newLocal).execSync('git rev-parse HEAD').toString().substring(0, 7)
37

48
export const data = new DiscordSlashCommandBuilder()
59
.setName('uptime')
@@ -27,6 +31,34 @@ exports.Command = async (client: DiscordClient, interaction: DiscordChatInputCom
2731
lng: interaction.user.language,
2832
},
2933
}),
34+
inline: true,
35+
},
36+
{
37+
name: 'Discord.js:',
38+
value: `v${project.dependencies['discord.js'].slice(1)}`,
39+
inline: true,
40+
},
41+
{
42+
name: '‎',
43+
value: '‎',
44+
inline: true,
45+
},
46+
])
47+
.addFields([
48+
{
49+
name: 'OS:',
50+
value: `${os.type()} ${os.release()}`,
51+
inline: true,
52+
},
53+
{
54+
name: 'NodeJs:',
55+
value: `${process.version}`,
56+
inline: true,
57+
},
58+
{
59+
name: 'Latest git Commit:',
60+
value: `[\`${latest_commit}\`](https://github.com/Chr1s70ph/ETIT-Master/commit/${latest_commit})`,
61+
inline: true,
3062
},
3163
])
3264
.setColor('#FF4040')

0 commit comments

Comments
 (0)