【问题标题】:Discord js Giveaway command with join server requirement具有加入服务器要求的 Discord js Giveaway 命令
【发布时间】:2020-08-24 23:21:14
【问题描述】:

我正在尝试为我的机器人创建一个有服务器要求的赠品命令 如果他没有加入给定的服务器,则不应添加成员反应。有人可以帮助我吗?

【问题讨论】:

标签: javascript discord.js


【解决方案1】:

无法停止添加反应,但您可以使用reaction.users.remove(UserResolvable) 轻松删除它。所以做一些事情

client.on("messageReactionAdd",(reaction,user) => {
    if (/*test if the message is giveaway*/) {
        if (!/*user is in the guild*/) {
            reaction.users.remove(user);
        }
    }
})

.

【讨论】:

    猜你喜欢
    • 2019-05-02
    • 2021-09-15
    • 2021-11-29
    • 2018-07-24
    • 2022-01-12
    • 1970-01-01
    • 1970-01-01
    • 2022-01-10
    • 1970-01-01
    相关资源
    最近更新 更多