Skip to content

Commit 65d6999

Browse files
authored
feat: add BaseEvent.client alias property (#1368)
1 parent c3fc966 commit 65d6999

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

interactions/api/events/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ class BaseEvent:
2727
bot: "Client" = attrs.field(repr=False, kw_only=True, default=MISSING)
2828
"""The client instance that dispatched this event."""
2929

30+
@property
31+
def client(self) -> "Client":
32+
"""The client instance that dispatched this event."""
33+
return self.bot
34+
3035
@property
3136
def resolved_name(self) -> str:
3237
"""The name of the event, defaults to the class name if not overridden."""

0 commit comments

Comments
 (0)