[英]How does AutoShardedBot work in discord.py?
Would someone explain how sharding works, specifically discord.ext.commands.AutoShardedBot
?有人会解释分片是如何工作的,特别是
discord.ext.commands.AutoShardedBot
吗? I put multiple questions below:我在下面提出了多个问题:
Thanks for your time.谢谢你的时间。
(guild_id >> 22) % shard_count
(guild_id >> 22) % shard_count
分配给分(guild_id >> 22) % shard_count
if you need to split it to multiple machines, you can pass shard_id
and shard_count
to a normal Bot
instance.如果你需要把它拆分到多台机器上,你可以将
shard_id
和shard_count
传递给一个普通的Bot
实例。
Would someone explain how sharding works, specifically discord.ext.commands.AutoShardedBot
?有人会解释分片的工作原理,特别是
discord.ext.commands.AutoShardedBot
吗? I put multiple questions below:我在下面提出了多个问题:
Thanks for your time.谢谢你的时间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.