This commit is contained in:
Ashley Graves 2024-10-10 08:34:00 +02:00
parent 2f09b99d0b
commit 2eaadf2208
9 changed files with 224 additions and 31 deletions

View file

@ -1,7 +1,7 @@
const { ContextMenuCommandBuilder, ApplicationCommandType, InteractionContextType, ApplicationIntegrationType, AttachmentBuilder } = require('discord.js');
const { ContextMenuCommandBuilder, ApplicationCommandType, InteractionContextType, ApplicationIntegrationType, AttachmentBuilder } = require("discord.js");
const data = new ContextMenuCommandBuilder()
.setName('Message Information')
.setName("Message Information")
.setType(ApplicationCommandType.Message)
.setContexts([
InteractionContextType.Guild,
@ -19,8 +19,8 @@ module.exports = {
await interaction.reply({
files: [
new AttachmentBuilder()
.setName(interaction.targetMessage.id + ".json")
.setFile(Buffer.from(JSON.stringify(interaction.targetMessage.toJSON(), null, 4), "utf-8"))
.setName(interaction.targetMessage.id + ".json")
.setFile(Buffer.from(JSON.stringify(interaction.targetMessage.toJSON(), null, 4), "utf-8"))
],
ephemeral: true
});

View file

@ -1,7 +1,7 @@
const { ContextMenuCommandBuilder, ApplicationCommandType, InteractionContextType, ApplicationIntegrationType } = require('discord.js');
const { ContextMenuCommandBuilder, ApplicationCommandType, InteractionContextType, ApplicationIntegrationType } = require("discord.js");
const data = new ContextMenuCommandBuilder()
.setName('User Information')
.setName("User Information")
.setType(ApplicationCommandType.User)
.setContexts([
InteractionContextType.Guild,
@ -19,8 +19,8 @@ module.exports = {
await interaction.reply({
files: [
new AttachmentBuilder()
.setName(interaction.targetUser.id + ".json")
.setFile(Buffer.from(JSON.stringify(interaction.targetUser.toJSON(), null, 4), "utf-8"))
.setName(interaction.targetUser.id + ".json")
.setFile(Buffer.from(JSON.stringify(interaction.targetUser.toJSON(), null, 4), "utf-8"))
],
ephemeral: true
});