fix: remove star decorator for AstrBot v3 compatibility
This commit is contained in:
3
main.py
3
main.py
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user