@@ -41,7 +41,7 @@ async def send(self,
41
41
content : str = "" ,
42
42
embeds : typing .List [discord .Embed ] = None ,
43
43
tts : bool = False ,
44
- allowed_mentions : typing . List [ discord .AllowedMentions ] = None ,
44
+ allowed_mentions : discord .AllowedMentions = None ,
45
45
hidden : bool = False ):
46
46
"""
47
47
Sends response of the slash command.
@@ -58,7 +58,7 @@ async def send(self,
58
58
:param tts: Whether to speak message using tts. Default ``False``.
59
59
:type tts: bool
60
60
:param allowed_mentions: AllowedMentions of the message.
61
- :type allowed_mentions: List[ discord.AllowedMentions]
61
+ :type allowed_mentions: discord.AllowedMentions
62
62
:param hidden: Whether the message is hidden, which means message content will only be seen to the author.
63
63
:return: ``None``
64
64
"""
@@ -70,15 +70,15 @@ async def send(self,
70
70
"tts" : tts ,
71
71
"content" : content ,
72
72
"embeds" : [x .to_dict () for x in embeds ] if embeds else [],
73
- "allowed_mentions" : [ x .to_dict () for x in allowed_mentions ] if allowed_mentions
74
- else self ._discord .allowed_mentions .to_dict () if self ._discord .allowed_mentions else []
73
+ "allowed_mentions" : allowed_mentions .to_dict () if allowed_mentions
74
+ else self ._discord .allowed_mentions .to_dict () if self ._discord .allowed_mentions else {}
75
75
}
76
76
} if not self .sent else {
77
77
"content" : content ,
78
78
"tts" : tts ,
79
79
"embeds" : [x .to_dict () for x in embeds ] if embeds else [],
80
- "allowed_mentions" : [ x .to_dict () for x in allowed_mentions ] if allowed_mentions
81
- else self ._discord .allowed_mentions .to_dict () if self ._discord .allowed_mentions else []
80
+ "allowed_mentions" : allowed_mentions .to_dict () if allowed_mentions
81
+ else self ._discord .allowed_mentions .to_dict () if self ._discord .allowed_mentions else {}
82
82
}
83
83
if hidden :
84
84
base ["flags" ] = 64
@@ -92,7 +92,7 @@ async def edit(self,
92
92
content : str = "" ,
93
93
embeds : typing .List [discord .Embed ] = None ,
94
94
tts : bool = False ,
95
- allowed_mentions : typing . List [ discord .AllowedMentions ] = None ):
95
+ allowed_mentions : discord .AllowedMentions = None ):
96
96
"""
97
97
Edits response of the slash command.
98
98
@@ -104,7 +104,7 @@ async def edit(self,
104
104
:param tts: Whether to speak message using tts. Default ``False``.
105
105
:type tts: bool
106
106
:param allowed_mentions: AllowedMentions of the message.
107
- :type allowed_mentions: List[ discord.AllowedMentions]
107
+ :type allowed_mentions: discord.AllowedMentions
108
108
:return: ``None``
109
109
"""
110
110
if embeds and len (embeds ) > 10 :
@@ -113,8 +113,8 @@ async def edit(self,
113
113
"content" : content ,
114
114
"tts" : tts ,
115
115
"embeds" : [x .to_dict () for x in embeds ] if embeds else [],
116
- "allowed_mentions" : [ x .to_dict () for x in allowed_mentions ] if allowed_mentions
117
- else self ._discord .allowed_mentions .to_dict () if self ._discord .allowed_mentions else []
116
+ "allowed_mentions" : allowed_mentions .to_dict () if allowed_mentions
117
+ else self ._discord .allowed_mentions .to_dict () if self ._discord .allowed_mentions else {}
118
118
}
119
119
await self ._http .edit (base , self ._discord .user .id , self .__token , message_id )
120
120
0 commit comments