hitomi/weather/bot.py

19 lines
408 B
Python

"""Provide weather information over Discord."""
import logging
from bot import hitomi
from weather import lib
logger = logging.getLogger(__name__)
logger.info("loading weather plugin")
@hitomi.command()
async def forecast(query: str):
await hitomi.say(lib.get_forecast_for_query([query]))
@hitomi.command()
async def weather(query: str):
await hitomi.say(lib.get_conditions_for_query([query]))