mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Add support for premium app integrations
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com> Co-authored-by: Lucas Hardt <lucas.hardt@fu-berlin.de> Co-authored-by: Andrin S. <65789180+Puncher1@users.noreply.github.com>
This commit is contained in:
@ -53,6 +53,7 @@ import os
|
||||
|
||||
from .guild import Guild
|
||||
from .activity import BaseActivity
|
||||
from .sku import Entitlement
|
||||
from .user import User, ClientUser
|
||||
from .emoji import Emoji
|
||||
from .mentions import AllowedMentions
|
||||
@ -1584,6 +1585,18 @@ class ConnectionState(Generic[ClientT]):
|
||||
|
||||
self.dispatch('raw_typing', raw)
|
||||
|
||||
def parse_entitlement_create(self, data: gw.EntitlementCreateEvent) -> None:
|
||||
entitlement = Entitlement(data=data, state=self)
|
||||
self.dispatch('entitlement_create', entitlement)
|
||||
|
||||
def parse_entitlement_update(self, data: gw.EntitlementUpdateEvent) -> None:
|
||||
entitlement = Entitlement(data=data, state=self)
|
||||
self.dispatch('entitlement_update', entitlement)
|
||||
|
||||
def parse_entitlement_delete(self, data: gw.EntitlementDeleteEvent) -> None:
|
||||
entitlement = Entitlement(data=data, state=self)
|
||||
self.dispatch('entitlement_update', entitlement)
|
||||
|
||||
def _get_reaction_user(self, channel: MessageableChannel, user_id: int) -> Optional[Union[User, Member]]:
|
||||
if isinstance(channel, (TextChannel, Thread, VoiceChannel)):
|
||||
return channel.guild.get_member(user_id)
|
||||
|
Reference in New Issue
Block a user