Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
437 views
in Technique[技术] by (71.8m points)

javascript - discord.js | Reply to Message (Actual Reply with Reply Decoration)

Recently, Discord added new functionality that when a user replies to a message, it quotes it and adds a little line that the replier's profile picture with the original sender's profile picture and message, as seen here (me replying to a message from a bot):

Message reply screenshot

Is it possible to do it with Discord.js?

Currently, I've no problem using message.reply(), however the bot just sends a message, rather than actually reply to it (sends a "reply-typed" message), which is what is shown when I reply to a message via the app's GUI, manually (as shown above).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Discord.js will support inline replies in version 13, replacing Message#reply with the new functionality. If you want to try the feature ahead of time, please install and test this PR: https://github.com/discordjs/discord.js/pull/4874. We are always happy to receive bug reports before features are released! (As per usual the ETA on v13 is "when it's ready")

The maintainers of the djs module have made a comment about this in the official djs server's faq channel. This feature is expected to be implemented only in version 13, if you want to implement this you have to fork djs and write your own reply code to use the message reference parameter in the official discord API gateway


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...