Skip to content

Commit

Permalink
⬆️ update to satori-python 0.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Sep 28, 2024
1 parent 9f185e8 commit 19f89cc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
12 changes: 7 additions & 5 deletions arclet/entari/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from arclet.letoderea import Contexts, Param, Provider
from satori import ArgvInteraction, ButtonInteraction, Channel
from satori import Event as SatoriEvent
from satori import EventType, Guild, Login, Member, Quote, Role, User
from satori import EventType, Guild, Member, Quote, Role, User
from satori.client import Account
from satori.model import MessageObject
from satori.model import LoginType, MessageObject
from tarina import gen_subclass

from .message import MessageChain
Expand Down Expand Up @@ -48,7 +48,7 @@ class Event:
button: ButtonInteraction | None = attr()
channel: Channel | None = attr()
guild: Guild | None = attr()
login: Login | None = attr()
login: LoginType | None = attr()
member: Member | None = attr()
message: MessageObject | None = attr()
operator: User | None = attr()
Expand Down Expand Up @@ -138,7 +138,7 @@ async def __call__(self, context: Contexts):
return context["role"]
return context["$origin_event"].role

class LoginProvider(Provider[Login]):
class LoginProvider(Provider[LoginType]):
async def __call__(self, context: Contexts):
if "login" in context:
return context["login"]
Expand Down Expand Up @@ -227,7 +227,7 @@ class GuildRoleUpdatedEvent(GuildRoleEvent):


class LoginEvent(NoticeEvent):
login: Login = attr()
login: LoginType = attr()


class LoginAddedEvent(LoginEvent):
Expand All @@ -243,6 +243,8 @@ class LoginUpdatedEvent(LoginEvent):


class MessageContentProvider(Provider[MessageChain]):
priority = 30

async def __call__(self, context: Contexts):
return context["$message_content"]

Expand Down
14 changes: 7 additions & 7 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [
dependencies = [
"arclet-letoderea>=0.11.0",
"arclet-alconna>=1.8.30",
"satori-python-core>=0.13.0",
"satori-python-core>=0.14.5",
"satori-python-client>=0.14.5",
"arclet-alconna-tools>=0.7.3",
"pygtrie>=2.5.0",
Expand Down

0 comments on commit 19f89cc

Please sign in to comment.