Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
fllesser committed Jan 11, 2025
1 parent 5386704 commit bd7ec60
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
20 changes: 16 additions & 4 deletions nonebot_plugin_fortnite/__init__.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
from nonebot import (
require,
get_driver, # @get_driver().on_startup 装饰启动时运行函数
get_bots # dict[str, BaseBot]
get_bots, # dict[str, BaseBot]
get_plugin
)
from nonebot.log import logger
from nonebot.plugin import PluginMetadata

require("nonebot_plugin_uninfo")
require("nonebot_plugin_alconna")
require("nonebot_plugin_apscheduler")
require("nonebot_plugin_localstore")
from nonebot_plugin_apscheduler import scheduler

from .config import Config
from .matcher import *
from .pve import screenshot_vb_img
from .shop import screenshot_shop_img

alc_plugin: Plugin = nonebot.get_plugin("nonebot_plugin_alconna")

__plugin_meta__ = PluginMetadata(
name="堡垒之夜游戏插件",
description="堡垒之夜战绩,季卡,商城,vb图查询",
usage="季卡/生涯季卡/战绩/生涯战绩/商城/vb图",
type="application",
config=Config,
homepage="https://github.com/fllesser/nonebot-plugin-fortnite",
supported_adapters=None
supported_adapters=alc_plugin.metadata.supported_adapters
)


Expand All @@ -33,5 +39,11 @@
minute = 5,
)
async def _():
await screenshot_shop_img()
await screenshot_vb_img()
try:
await screenshot_shop_img()
except Exception:
pass
try:
await screenshot_vb_img()
except Exception:
pass
1 change: 0 additions & 1 deletion nonebot_plugin_fortnite/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from nonebot import get_plugin_config, require

from pathlib import Path
require("nonebot_plugin_localstore")
import nonebot_plugin_localstore as store


Expand Down
3 changes: 0 additions & 3 deletions nonebot_plugin_fortnite/matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
from nonebot import require
from nonebot.plugin.on import on_command
from nonebot.permission import SUPERUSER

require("nonebot_plugin_uninfo")
from nonebot_plugin_uninfo import (
get_session,
Uninfo
)
require("nonebot_plugin_alconna")
from nonebot_plugin_alconna import (
on_alconna,
AlconnaMatcher,
Expand Down

0 comments on commit bd7ec60

Please sign in to comment.