rename file.

This commit is contained in:
2025-10-29 08:46:18 +01:00
parent dd8fc81097
commit 25fd742cfe
2 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import { ApplicationIntegrationType, ChatInputCommandInteraction, CommandInteraction, EmbedBuilder, InteractionContextType, SlashCommandBuilder } from "discord.js";
import ping from "ping";
import statusService from "../../services/status.service";
export default {
data: new SlashCommandBuilder()
.setName('status')
.setDescription('Give statut of servers.')
.setIntegrationTypes(
ApplicationIntegrationType.GuildInstall,
ApplicationIntegrationType.UserInstall
)
.setContexts(
InteractionContextType.BotDM,
InteractionContextType.Guild,
InteractionContextType.PrivateChannel
),
async execute(interaction : ChatInputCommandInteraction) {
await interaction.deferReply();
const embed = new EmbedBuilder();
embed.setTitle('Status of protojx servers');
embed.setColor(0xffffff);
embed.setTimestamp(new Date());
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});
}
await interaction.editReply({embeds: [embed]});
}
}