试图在15分钟内解决这个问题,但没有成功
代码:
client.on('ready', () => {
client.user.setActivity('you type commands uwu', { type: 'WATCHING' });
console.log(`${client.user.username} is fully active.`);
console.log(`${client.guilds}`)
})
现在我只是想获取ID,但是我需要两者,这真是很烦人
答案 0 :(得分:2)
您可以公会集会。
client.on('ready', () => {
client.user.setActivity('you type commands uwu', { type: 'WATCHING' });
console.log(`${client.user.username} is fully active.`);
let guilds = client.guilds.cache.map(guild => guild.id) // for discord v11 //let guilds = client.guilds.map(guild => guild.id)
console.log(guilds)
})