async def get_and_match_args(parser): args = parser.parse_args() if args.wtrack: await onlinetracker.tracker(args.target) elif args.wtgbot: tgbot.telegram_status(args.target) elif args.wchat: await wchat.chat(args.target) elif args.wblast: await messageblast.blast(args.target) elif args.wtimer: await messagetimer.msgTimer(args.target) elif args.pull: if args.target is None: parser.print_help() parser.exit() try: bID: int = int(sys.argv[3]) except (IndexError, ValueError): bID: int = 0 savechat.runMain('pull', str(args.target), bID) elif args.schedule: await scheduleMessage.schedule_message(args.target) elif args.wabout: await changeAbout.changeAbout() elif args.wnews: await wnews.get_news(args.target)
async def match_args(args): if args.wtrack: await onlinetracker.tracker(args.name) elif args.wtgbot: tgbot.telegram_status(args.name) elif args.wchat: await wchat.chat(args.name) elif args.wblast: await messageblast.blast(args.name) elif args.wtimer: await messagetimer.msgTimer(args.name) elif args.pull: try: bID = int(sys.argv[3]) except (IndexError, ValueError): bID = 0 savechat.runMain('pull', str(args.name), bID)