如何在等待反应时使用服装表情符号?

时间:2020-05-07 09:27:38

标签: discord discord.js

我这样做了,但是当我放置自定义表情符号时,它不起作用,它仅适用于unicode表情符号。

message.react('707879839943753758').then(() => message.react('?'));

const filter = (reaction, user) => {
    return ['707879839943753758', '?'].includes(reaction.emoji.name) && user.id === message.author.id;
};

message.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] })
    .then(collected => {
        const reaction = collected.first();

        if (reaction.emoji.name === '707879839943753758') {
            message.reply('report something');
        } else {
            message.reply('did not report anything');
        }
    })
    .catch(collected => {
        message.reply('you reacted with neither a thumbs up, nor a thumbs down.');
    });

我需要更改什么才能使其正常工作?

1 个答案:

答案 0 :(得分:1)

在访问get()的{​​{1}}集合并获取自定义表情符号之前,您需要client自定义表情符号:

emojis