如何发送数字框表情符号(1️⃣)? [英] How do I send number boxes emojis (1️⃣)?
本文介绍了如何发送数字框表情符号(1️⃣)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何发送它们?如果我尝试这样做:msg.act(‘1️⃣’),它会返回一个错误,告诉我这是一个未知的表情符号。我该怎么办?
client.on("message", async msg => {
if (command === 'vote') {
msg.channel.send('response')
.then(m => m.react('1️⃣')
}
}
推荐答案
摘自discordjs.guide ( the opensource guide maintained by the discord.js community).
执行如下操作(或仅复制并粘贴数字):
// emojiCharacters.js module.exports = { a: '🇦', b: '🇧', c: '🇨', d: '🇩', e: '🇪', f: '🇫', g: '🇬', h: '🇭', i: '🇮', j: '🇯', k: '🇰', l: '🇱', m: '🇲', n: '🇳', o: '🇴', p: '🇵', q: '🇶', r: '🇷', s: '🇸', t: '🇹', u: '🇺', v: '🇻', w: '🇼', x: '🇽', y: '🇾', z: '🇿', 0: '0⃣', 1: '1⃣', 2: '2⃣', 3: '3⃣', 4: '4⃣', 5: '5⃣', 6: '6⃣', 7: '7⃣', 8: '8⃣', 9: '9⃣', 10: '🔟', '#': '#⃣', '*': '*⃣', '!': '❗', '?': '❓', };
然后您可以执行以下操作:
// index.js const emojiCharacters = require('./emojiCharacters'); console.log(emojiCharacters.a); // 🇦 console.log(emojiCharacters[10]); // 🔟 console.log(emojiCharacters['!']); // ❗
这篇关于如何发送数字框表情符号(1️⃣)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文