We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.parent
1 parent 9914770 commit 2b4ccc7Copy full SHA for 2b4ccc7
discord/ui/view.py
@@ -55,6 +55,7 @@
55
from ..components import TextDisplay as TextDisplayComponent
56
from ..components import Thumbnail as ThumbnailComponent
57
from ..components import _component_factory
58
+from ..enums import ChannelType
59
from ..utils import find
60
from .core import ItemInterface
61
from .item import ItemCallbackType, ViewItem
@@ -303,7 +304,11 @@ async def on_timeout(self) -> None:
303
304
if self.disable_on_timeout:
305
self.disable_all_items()
306
- if not self._message or self._message.flags.ephemeral:
307
+ if (
308
+ not self._message
309
+ or self._message.flags.ephemeral
310
+ or (self._message.channel.type == ChannelType.private)
311
+ ):
312
message = self.parent
313
else:
314
message = self.message
0 commit comments