I would like my discord bot to send an image (from a url), but have the url be hidden from the message that is sent in chat. For sending messages, im using a switch statement that only uses the writing after an "!"
case 'happy':
bot.sendMessage({
to: channelID,
message: 'https://pictureexample.jpg'
});
How would I send messages without having the link show in chat?
As user4261590 wrote, you can use embeds to achieve this. Here's an example that might work for you:
case 'happy':
const embed = {
"image": {
"url": "https://pictureexample.jpg"
}
};
bot.sendMessage({
to: channelID,
message: embed
});