mirror of
https://github.com/thedrewen/protojx-manager.git
synced 2026-03-21 01:48:54 +01:00
Refactor status command to use environment variables for emoji status
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
TOKEN=
|
||||
CLIENT_ID=
|
||||
CLIENT_ID=
|
||||
|
||||
EMOJI_STATUS_ONLINE=<a:online:1432684754276323431>
|
||||
EMOJI_STATUS_OFFLINE=<a:offline:1432684900175183882>
|
||||
@@ -25,7 +25,7 @@ export default {
|
||||
embed.setThumbnail(interaction.client.user.avatarURL())
|
||||
|
||||
for(let host of statusService.hosts){
|
||||
embed.addFields({name: host.name, value: host.alive ? '<a:online:1432684754276323431> Online' : '<a:offline:1432684900175183882> Offline', inline: false});
|
||||
embed.addFields({name: host.name, value: host.alive ? `${process.env.EMOJI_STATUS_ONLINE} Online` : `${process.env.EMOJI_STATUS_OFFLINE} Offline`, inline: false});
|
||||
}
|
||||
|
||||
await interaction.editReply({embeds: [embed]});
|
||||
|
||||
Reference in New Issue
Block a user