how to put make the discord bot put an image? Node.js
how to put make the discord bot put an image? Node.js
Voters
LukeArwolf
can you help me put an image in this code?
const Discord = require('discord.js');
module.exports.run = async (client, message, args) => {
message.channel.send('test');
console.log('test');
};
SixBeeps
Is this in an embed, or just a normal image?
LukeArwolf
@SixBeeps normal image
SixBeeps
@LukeArwolf Something like this:
channel.send({ files: ['https://link-to.some/image.png'] })
LukeArwolf
@SixBeeps needs to be .png?
LukeArwolf
@SixBeeps it didn't work
SixBeeps
@LukeArwolf It should be any image that Discord supports (png/jpg)
Show me the code that doesn't work.
Show me the code that doesn't work.
LukeArwolf
@SixBeeps I want to put an image after the text "test"
const Discord = require('discord.js');
module.exports.run = async (client, message, args) => {
message.channel.send('test');
console.log('test');
};
SixBeeps
@LukeArwolf
const Discord = require('discord.js'); module.exports.run = async (client, message, args) => { message.channel.send('test', { files: ['https://link-to.some/image.png'] }); console.log('test'); };
LukeArwolf
@SixBeeps THANK YOU VERY MUCH. helped a lot <3 <3 <3
now it worked <3 <3
now it worked <3 <3
Add a folder called
images
, put an image in it, and add the following code:Then type
!image
in your discord server and it will appear!