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
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2024-04-27 02:20:44 +08:00
|
|
|
from ...utils.base.data_manager import set_memory_data
|
|
|
|
|
|
|
|
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)
|