1
0
forked from bot/app
LiteyukiBot/liteyuki/plugins/liteyuki_weather/__init__.py

28 lines
701 B
Python
Raw Normal View History

2024-03-22 12:41:38 +08:00
from nonebot.plugin import PluginMetadata
2024-04-27 02:20:44 +08:00
from nonebot import get_driver
2024-04-11 13:15:29 +08:00
from .qweather import *
2024-03-22 12:41:38 +08:00
__plugin_meta__ = PluginMetadata(
name="轻雪天气",
description="基于和风天气api的天气插件",
usage="",
type="application",
homepage="https://github.com/snowykami/LiteyukiBot",
extra={
2024-04-27 02:20:44 +08:00
"liteyuki" : True,
"toggleable" : True,
"default_enable": True,
2024-03-22 12:41:38 +08:00
}
)
from ...internal.base.data_manager import set_memory_data
2024-04-27 02:20:44 +08:00
driver = get_driver()
@driver.on_startup
async def _():
# 检查是否为开发者模式
is_dev = await check_key_dev(get_config("weather_key", ""))
set_memory_data("weather.is_dev", is_dev)