mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-11-09 19:36:44 +00:00
Improve command module and add "schedule" command group
This commit is contained in:
16
none/argparse.py
Normal file
16
none/argparse.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from argparse import *
|
||||
|
||||
|
||||
class ParserExit(RuntimeError):
|
||||
def __init__(self, status=0, message=None):
|
||||
self.status = status
|
||||
self.message = message
|
||||
|
||||
|
||||
class ArgumentParser(ArgumentParser):
|
||||
def _print_message(self, *args, **kwargs):
|
||||
# do nothing
|
||||
pass
|
||||
|
||||
def exit(self, status=0, message=None):
|
||||
raise ParserExit(status=status, message=message)
|
||||
Reference in New Issue
Block a user