简体   繁体   English

如何显示反应模式 Discord.js

[英]How Do I Show A Modal On Reaction Discord.js

I Was Wondering How Do I Show A Discord.js Modal To A User That Reacted To A Message, My Use Is: Someone Posts Something, If A Mod Reacts With A Warning Sign, It Will Show A Mod A Modal To Type The Reason For The Warning, I Know How To Do That Stuff, But What I Am Looking For How To Do Is Only Showing The Modal On Reaction, So Please Someone Tell Me If It's Possible Or Not, If It Is Show Me How, Thank You.我想知道如何向对消息做出反应的用户显示 Discord.js 模态,我的用途是:有人发布某些内容,如果 Mod 以警告标志做出反应,它将显示 Mod 模态以键入警告的原因,我知道该怎么做,但我正在寻找的只是显示反应的模态,所以请有人告诉我是否可能,如果它告诉我如何做,谢谢。

Modals can only be triggered through responses to interactions started by users.模态只能通过对用户发起的交互的响应来触发。 This is to prevent bots from opening modals at will and spamming users with stuff on their screens.这是为了防止机器人随意打开模式并在用户的屏幕上向用户发送垃圾邮件。 Currently, emoji reactions to messages are not considered Interactions , and therefore you cannot trigger modals from them.目前,表情符号对消息的反应不被视为交互,因此您不能从它们触发模式。

For the use case you described, in which you want moderators to be able to trigger actions from a user's message, you might want to experiment with Message Commands , which can be triggered by right-clicking any message and selecting the command.对于您描述的用例,您希望主持人能够从用户的消息中触发操作,您可能希望尝试使用消息命令,可以通过右键单击任何消息并选择命令来触发。 These will fire an Interaction that you can reply to with a modal.这些将触发您可以使用模态回复的交互。

Here's an example of how Message Commands look like:下面是消息命令的示例: 在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM