mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2025-04-12 23:29:37 +08:00
🐛 Fix TypeError in call of escape_tag
This commit is contained in:
parent
10499d1e33
commit
fdf16ff9a3
@ -11,13 +11,13 @@ class logger:
|
||||
|
||||
@staticmethod
|
||||
def info(command: str, info: str = '', param: Dict[str, any] = None, result: str = '', result_type: bool = True):
|
||||
param_str = ' '.join([f'{k}<m>{escape_tag(v)}</m>' for k, v in param.items()]) if param else ''
|
||||
param_str = ' '.join([f'{k}<m>{escape_tag(str(v))}</m>' for k, v in param.items()]) if param else ''
|
||||
result_str = f'<g>{escape_tag(result)}</g>' if result_type else f'<r>{escape_tag(result)}</r>' if result else ''
|
||||
nb_logger.opt(colors=True).info(f'<u><y>[{command}]</y></u>{info}{param_str}{result_str}')
|
||||
|
||||
@staticmethod
|
||||
def success(command: str, info: str = '', param: Dict[str, any] = None, result: str = ''):
|
||||
param_str = ' '.join([f'{k}<m>{escape_tag(v)}</m>' for k, v in param.items()]) if param else ''
|
||||
param_str = ' '.join([f'{k}<m>{escape_tag(str(v))}</m>' for k, v in param.items()]) if param else ''
|
||||
result_str = f'<g>{escape_tag(result)}</g>' if result else ''
|
||||
nb_logger.opt(colors=True).success(f'<u><y>[{command}]</y></u>{info}{param_str}{result_str}')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user