mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 00:55:19 +00:00
First pass at supporting user apps
Co-authored-by: red <red@kalab.sk> Co-authored-by: Vioshim <63890837+Vioshim@users.noreply.github.com>
This commit is contained in:
@ -472,7 +472,7 @@ class Context(discord.abc.Messageable, Generic[BotT]):
|
||||
|
||||
.. versionadded:: 2.0
|
||||
"""
|
||||
if self.channel.type is ChannelType.private:
|
||||
if self.interaction is None and self.channel.type is ChannelType.private:
|
||||
return Permissions._dm_permissions()
|
||||
if not self.interaction:
|
||||
# channel and author will always match relevant types here
|
||||
@ -506,7 +506,7 @@ class Context(discord.abc.Messageable, Generic[BotT]):
|
||||
.. versionadded:: 2.0
|
||||
"""
|
||||
channel = self.channel
|
||||
if channel.type == ChannelType.private:
|
||||
if self.interaction is None and channel.type == ChannelType.private:
|
||||
return Permissions._dm_permissions()
|
||||
if not self.interaction:
|
||||
# channel and me will always match relevant types here
|
||||
|
Reference in New Issue
Block a user