标签: javascript node.js discord discord.js
这不起作用: client.users.cache.get(`${args[0]}`).id;
client.users.cache.get(`${args[0]}`).id;
该如何解决?我正在使用v12
答案 0 :(得分:1)
尝试
matching_client = client.users.cache.filter(user => user.username === args[0]);
matching_client是与该用户名匹配的用户的集合
matching_client
相关文档链接: