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:
parent
7b2f963dd7
commit
c15a774a00
1 changed files with 7 additions and 6 deletions
13
bot.py
13
bot.py
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue