Skip to content

Commit

Permalink
refactor: node cmd sends img url instead
Browse files Browse the repository at this point in the history
  • Loading branch information
juddisjudd committed May 8, 2024
1 parent 5075328 commit e8e4a6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/commands/misc/node.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import { SlashCommandBuilder, CommandInteraction, AttachmentBuilder } from 'discord.js';
import { SlashCommandBuilder, CommandInteraction } from 'discord.js';
import { Command } from '../../interfaces/command';
import path from 'path';

const NodeImage: Command = {
data: new SlashCommandBuilder()
.setName('node')
.setDescription('Gottfried loves node.'),
.setDescription('Sends an image related to Node.js'),

async run(interaction: CommandInteraction) {
const imagePath = path.join(__dirname, '../../data/imgs/node.png');
const imageAttachment = new AttachmentBuilder(imagePath);

await interaction.reply({ files: [imageAttachment] });
const imageUrl = 'https://i.imgur.com/9YFX9AR.png';
await interaction.reply({ content: imageUrl });
},
};

Expand Down
Binary file removed src/data/imgs/node.png
Binary file not shown.

0 comments on commit e8e4a6a

Please sign in to comment.