简体   繁体   English

如何添加对不和谐 webhook 有效负载的反应

[英]How to add reactions to discord webhook payload

I already did several webhook-payloads for my discord-servers, but I never managed to add reactions to it.我已经为我的不和谐服务器做了几个 webhook-payloads,但我从来没有设法添加反应。 I mainly use this documentation<\/a> .我主要使用这个文档<\/a>。 I tried to check several resources for help on this, but never was successful.我试图检查几个资源以寻求帮助,但从未成功。

Is it even possible?甚至可能吗?

"

No, it is not possible. 不,不可能。 Take a look at the Webhook Documentation of Discord When you go down a bit you can see what is possible to send with the payload 看看Discord的Webhook文档。当您有点失望时,您可以看到随负载一起发送的内容

You could make another if statement like:你可以再做一个 if 语句,如:

if (message.webhookID) {
  message.react(`reaction`)
}

You could also make it so that it would only react to a webhook on a specific channel你也可以让它只对特定频道上的 webhook 做出反应

if (message.wehookID && message.id == id) {
  message.react(`reaction`)
}

If you have a如果你有一个

if (msg.author.bot) return;

statement, you would have to put it above that声明,你必须把它放在上面

You could try using the text command +:emoji: in a message sent by the bot.您可以尝试在机器人发送的消息中使用文本命令+:emoji: (Not sure if this works) (不确定这是否有效)

不,目前不可能。

这似乎是被懒惰忽略的基本功能

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

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