Skip to content

Commit a38b56f

Browse files
authored
fix: use message channel for PrefixedContext (#1491)
1 parent c229ce1 commit a38b56f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

interactions/ext/prefixed_commands/context.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from interactions.client.client import Client
66
from interactions.client.mixins.send import SendMixin
7+
from interactions.models.discord.channel import TYPE_MESSAGEABLE_CHANNEL
78
from interactions.models.discord.embed import Embed
89
from interactions.models.discord.file import UPLOADABLE_TYPE
910
from interactions.models.discord.message import Message
@@ -62,6 +63,11 @@ def message(self) -> Message:
6263
"""The message that invoked this context."""
6364
return self._message
6465

66+
@property
67+
def channel(self) -> TYPE_MESSAGEABLE_CHANNEL:
68+
"""The channel this context was invoked in."""
69+
return self.message.channel
70+
6571
@property
6672
def invoke_target(self) -> str:
6773
"""The name of the command to be invoked."""

0 commit comments

Comments
 (0)