You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
760 B

from __future__ import print_function
import logging
import argparse
from gevent import monkey
monkey.patch_all()
parser = argparse.ArgumentParser()
parser.add_argument('--token', help='Bot Authentication Token', required=True)
parser.add_argument('--shard-count', help='Total number of shards', default=1)
parser.add_argument('--shard-id', help='Current shard number/id', default=0)
logging.basicConfig(level=logging.INFO)
def disco_main():
args = parser.parse_args()
from disco.util.token import is_valid_token
if not is_valid_token(args.token):
print('Invalid token passed')
return
from disco.client import DiscoClient
return DiscoClient.from_cli(args)
if __name__ == '__main__':
disco_main().run_forever()