Using InteractionCreate want to add multiple emoji/unicode images to text v14.14.x
My bot is taking in a value and returns back multiple lines of text. For each line if text I'd like to include an image/icon/emoji representing the line. Here is the base of the code. Can you include inline images with this type of interaction?
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('mods')
.setDescription('Provides information about the user.')
.addStringOption(option =>
option.setName('toon')
.setDescription('The toon you want or list to show them all')
.setRequired(false)
),
async execute(interaction) {
const toon = interaction.options.getString('toon');
let toonId = 0;
try {
toonId = parseInt(toon, 10);
} catch (exceptionVar) {
await interaction.reply('Invalid input. MUST be a number');
}
let output = 'Some random text to add but want to include images or unicode:' + '\n';
output += '<:image1> Title One' + '\n';
output += '<:image2> Title Two' + '\n';
output += '<:image3> Title Three' + '\n';
await interaction.reply(output);
},
};
4 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!There are no inline images other than emoji
But can I add emoji's inline in this case? I tried adding but they just get displayed as the text and not converted to the emoji
Thats not how emojis are formatted, but sure