Skip to content

Commit

Permalink
fix(messageinfo): remove user card
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-737 committed Jan 31, 2024
1 parent 41cff8b commit b459abe
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 178 deletions.
168 changes: 0 additions & 168 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"@tensorflow/tfjs-node": "^4.16.0",
"@top-gg/sdk": "^3.1.6",
"common-tags": "^1.8.2",
"discord-arts": "^0.5.8",
"discord-hybrid-sharding": "^2.1.4",
"discord.js": "^14.14.1",
"dotenv": "^16.4.1",
Expand Down
9 changes: 0 additions & 9 deletions src/commands/context-menu/messageInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
ActionRow,
ActionRowBuilder,
ApplicationCommandType,
AttachmentBuilder,
ButtonBuilder,
ButtonComponent,
ButtonStyle,
Expand All @@ -19,7 +18,6 @@ import {
} from 'discord.js';
import db from '../../utils/Db.js';
import BaseCommand from '../BaseCommand.js';
import { profileImage } from 'discord-arts';
import { REGEX, colors, emojis } from '../../utils/Constants.js';
import { CustomID } from '../../utils/CustomID.js';
import { RegisterInteractionHandler } from '../../decorators/Interaction.js';
Expand Down Expand Up @@ -220,20 +218,13 @@ export default class MessageInfo extends BaseCommand {
},
),
)
.setImage('attachment://customCard.png') // link to image that will be generated afterwards
.setTimestamp();

// disable the user info button
MessageInfo.greyOutButton(components[0], 2);

// generate the profile card
const customCard = new AttachmentBuilder(await profileImage(author.id), {
name: 'customCard.png',
});

await interaction.editReply({
// attach the profile card to the message
files: [customCard],
embeds: [userEmbed],
components,
});
Expand Down

0 comments on commit b459abe

Please sign in to comment.