2
0
mirror of https://github.com/Nick80835/microbot synced 2025-09-06 01:16:00 +00:00
Files
microbot/ubot/modules/howdoi.py

14 lines
350 B
Python
Raw Normal View History

2020-05-24 13:41:27 -04:00
# SPDX-License-Identifier: GPL-2.0-or-later
from howdoi import howdoi
from ubot.micro_bot import micro_bot
ldr = micro_bot.loader
@ldr.add("hdi")
async def howdoi_cmd(event):
response = howdoi.howdoi(vars(howdoi.get_parser().parse_args(event.args.split(' '))))
await event.reply(f"**Query:**\n`{event.args}`\n**Answer:**\n`{response}`")