fix: remove star decorator for AstrBot v3 compatibility

This commit is contained in:
RainySY
2026-05-14 11:09:19 +08:00
parent 1c42f25f0f
commit 0ea43e90bf

View File

@@ -1,7 +1,7 @@
import re import re
import aiohttp import aiohttp
from astrbot.api.event import filter, AstrMessageEvent from astrbot.api.event import filter, AstrMessageEvent
from astrbot.api.star import Context, Star, star from astrbot.api.star import Context, Star
from astrbot.api import logger, AstrBotConfig from astrbot.api import logger, AstrBotConfig
GITHUB_API_BASE = "https://api.github.com" GITHUB_API_BASE = "https://api.github.com"
@@ -27,7 +27,6 @@ def _find_first_url(text: str, pattern: re.Pattern) -> re.Match | None:
return pattern.search(text) return pattern.search(text)
@star
class GitparserPlugin(Star): class GitparserPlugin(Star):
def __init__(self, context: Context, config: AstrBotConfig): def __init__(self, context: Context, config: AstrBotConfig):
super().__init__(context) super().__init__(context)