我正在制作一个排行榜机器人,并已意识到它的ping用户太多时调用,我想只显示他们的当前用户名。 let place = i + 1; let username = board[i].id; onBoard = true; leader += `*${place}*. <@${username}> score: **${b
我目前有一个排行榜设置,但我正在尝试获取服务器中前10个用户的用户名,但我在将用户ID转换为用户名时遇到了问题。问题是当我使用client.user.cache.get()时,.get()部分不能被识别,并且我得到一个TypeError: Cannot read property 'tag' of undefined错误为了进行比较,我并排运行了这两行代码,但只有第二行给出了错误: console.log(client.users.cache.get(message.author.id).tag);
c