fix(status): update host addresses and remove unused attachment logic in status command

This commit is contained in:
2025-11-26 09:22:36 +01:00
parent aebc6be99e
commit fcef934e60
2 changed files with 4 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
import { ApplicationIntegrationType, AttachmentBuilder, ChatInputCommandInteraction, InteractionContextType, MessageFlags, SlashCommandBuilder } from "discord.js";
import { ApplicationIntegrationType, ChatInputCommandInteraction, InteractionContextType, MessageFlags, SlashCommandBuilder } from "discord.js";
import statusService from "../../services/status.service";
import { CommandDefinition} from "../../type";
@@ -17,9 +17,7 @@ const cmd : CommandDefinition = {
),
async execute(interaction : ChatInputCommandInteraction) {
await interaction.deferReply();
let status = await statusService.getStatusImageBar('154.16.254.10');
const attachment = new AttachmentBuilder(status, {name: 'status.png'});
await interaction.editReply({components: [await statusService.getUpdatedContainer()], flags: MessageFlags.IsComponentsV2, files: [attachment]});
await interaction.editReply({components: [await statusService.getUpdatedContainer()], flags: MessageFlags.IsComponentsV2});
}
}