M
M
Merfin2020-06-15 04:25:38
JavaScript
Merfin, 2020-06-15 04:25:38

How to make an embed with input text?

I would like to embed with the text that the user enters in the discord in JavaScript.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-06-18
@Merfin

args = message.content.split(' ');
     args.shift();
     args = args.join(' ');

     const text =  new Discord.MessageEmbed()
     .setColor('#fff')
     .addField('Ваше сообщение:', args)


     if (message.content ===`!embed ${args}`) {
         message.channel.send(text)
     }

for the code to work correctly, you must have version 12 of discord.js and higher.
version of discord.js can be checked by typing into the command line npm list discord.js
, you can read more about the update here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question