@@ -41,7 +41,7 @@ async def send(self,
4141 content : str = "" ,
4242 embeds : typing .List [discord .Embed ] = None ,
4343 tts : bool = False ,
44- allowed_mentions : typing . List [ discord .AllowedMentions ] = None ,
44+ allowed_mentions : discord .AllowedMentions = None ,
4545 hidden : bool = False ):
4646 """
4747 Sends response of the slash command.
@@ -58,7 +58,7 @@ async def send(self,
5858 :param tts: Whether to speak message using tts. Default ``False``.
5959 :type tts: bool
6060 :param allowed_mentions: AllowedMentions of the message.
61- :type allowed_mentions: List[ discord.AllowedMentions]
61+ :type allowed_mentions: discord.AllowedMentions
6262 :param hidden: Whether the message is hidden, which means message content will only be seen to the author.
6363 :return: ``None``
6464 """
@@ -70,15 +70,15 @@ async def send(self,
7070 "tts" : tts ,
7171 "content" : content ,
7272 "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 {}
7575 }
7676 } if not self .sent else {
7777 "content" : content ,
7878 "tts" : tts ,
7979 "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 {}
8282 }
8383 if hidden :
8484 base ["flags" ] = 64
@@ -92,7 +92,7 @@ async def edit(self,
9292 content : str = "" ,
9393 embeds : typing .List [discord .Embed ] = None ,
9494 tts : bool = False ,
95- allowed_mentions : typing . List [ discord .AllowedMentions ] = None ):
95+ allowed_mentions : discord .AllowedMentions = None ):
9696 """
9797 Edits response of the slash command.
9898
@@ -104,7 +104,7 @@ async def edit(self,
104104 :param tts: Whether to speak message using tts. Default ``False``.
105105 :type tts: bool
106106 :param allowed_mentions: AllowedMentions of the message.
107- :type allowed_mentions: List[ discord.AllowedMentions]
107+ :type allowed_mentions: discord.AllowedMentions
108108 :return: ``None``
109109 """
110110 if embeds and len (embeds ) > 10 :
@@ -113,8 +113,8 @@ async def edit(self,
113113 "content" : content ,
114114 "tts" : tts ,
115115 "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 {}
118118 }
119119 await self ._http .edit (base , self ._discord .user .id , self .__token , message_id )
120120
0 commit comments