1
0
Fork 0
mirror of https://github.com/uhIgnacio/EmoteManager.git synced 2024-08-15 02:23:13 +00:00

bot: require sharding arguments

the stats cog expects the sharding attrs anyway
This commit is contained in:
io mintz 2020-06-19 03:56:27 +00:00
parent 7b2f963dd7
commit c15a774a00

13
bot.py
View file

@ -67,12 +67,13 @@ def main():
kwargs = dict(guild_subscriptions=False, request_offline_members=False)
if len(sys.argv) >= 3:
shard_count = int(sys.argv[1])
shard_ids = list(map(int, sys.argv[2].split('-')))
Bot(**kwargs, shard_count=shard_count, shard_ids=shard_ids).run()
else:
Bot(**kwargs).run()
if len(sys.argv) < 3:
print('Usage:', sys.argv[0], '<shard count> <hyphen-separated list of shard IDs>', file=sys.stderr)
sys.exit(1)
shard_count = int(sys.argv[1])
shard_ids = list(map(int, sys.argv[2].split('-')))
Bot(**kwargs, shard_count=shard_count, shard_ids=shard_ids).run()
if __name__ == '__main__':
main()