我知道自助机器人违反了 TOS。这是我自己的理解。
for user in ctx.guild.members:
这可以在 Discord.py 自助机器人中使用吗?
你的想法是正确的,但
ctx
不适用于discord.py-self
您可以使用
ctx
而不是使用 message.channel.guild
,这会起作用,但如果您想要成员计数,只需用户 guild.member_count
参考:https://discordpy-self.readthedocs.io/en/latest/api.html?highlight=game#discord.Guild.members