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:
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user