2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-31 14:38:04 +00:00

add no arg check to howdoi

This commit is contained in:
Nick80835
2020-05-24 16:21:33 -04:00
parent fc3ea1f3b3
commit 3a7769cfc7

View File

@@ -11,6 +11,10 @@ ldr = micro_bot.loader
@ldr.add("hdi")
async def howdoi_cmd(event):
if not event.args:
await event.reply(f"`Syntax: {ldr.settings.get_config('cmd_prefix') or '.'}hdi <question>`")
return
response = howdoi.howdoi(vars(howdoi.get_parser().parse_args(event.args.split(' '))))
response = re.sub(r'\n\n+', '\n\n', response).strip()