mirror of
https://github.com/thedrewen/protojx-manager.git
synced 2026-03-21 09:48:56 +01:00
fix(status): update host addresses and remove unused attachment logic in status command
This commit is contained in:
@@ -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});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user