如何使用分片获取所有用户 ID?
代码:client.shard.fetchClientValues('users.cache.map(({ id }) => id)')
答案 0 :(得分:0)
我说你的代码你试过了?我猜:
client.shard.fetchClientValues('users.cache').then(results => results.map(({ id }) => id))
或
const results = await client.shard.fetchClientValues('users.cache');
const ids = results.map(({ id }) => id);
虽然我从未使用过 discord.js,但我不知道它有什么作用。