@@ -770,7 +770,7 @@ async def _get_channel(self):
770770
771771 async def send (self , content = None , * , tts = False , embed = None , file = None ,
772772 files = None , delete_after = None , nonce = None ,
773- mentions = None ):
773+ allowed_mentions = None ):
774774 """|coro|
775775
776776 Sends a message to the destination with the content given.
@@ -806,7 +806,7 @@ async def send(self, content=None, *, tts=False, embed=None, file=None,
806806 If provided, the number of seconds to wait in the background
807807 before deleting the message we just sent. If the deletion fails,
808808 then it is silently ignored.
809- mentions : :class:`AllowedMentions`
809+ allowed_mentions : :class:`AllowedMentions`
810810 Controls the mentions being processed in this message.
811811
812812 .. versionadded:: 1.4
@@ -833,13 +833,13 @@ async def send(self, content=None, *, tts=False, embed=None, file=None,
833833 if embed is not None :
834834 embed = embed .to_dict ()
835835
836- if mentions is not None :
837- if state .mentions is not None :
838- mentions = state .mentions .merge (mentions ).to_dict ()
836+ if allowed_mentions is not None :
837+ if state .allowed_mentions is not None :
838+ allowed_mentions = state .allowed_mentions .merge (allowed_mentions ).to_dict ()
839839 else :
840- mentions = mentions .to_dict ()
840+ allowed_mentions = allowed_mentions .to_dict ()
841841 else :
842- mentions = state .mentions and state .mentions .to_dict ()
842+ allowed_mentions = state .allowed_mentions and state .allowed_mentions .to_dict ()
843843
844844 if file is not None and files is not None :
845845 raise InvalidArgument ('cannot pass both file and files parameter to send()' )
@@ -862,12 +862,13 @@ async def send(self, content=None, *, tts=False, embed=None, file=None,
862862
863863 try :
864864 data = await state .http .send_files (channel .id , files = files , content = content , tts = tts ,
865- embed = embed , nonce = nonce , mentions = mentions )
865+ embed = embed , nonce = nonce , allowed_mentions = allowed_mentions )
866866 finally :
867867 for f in files :
868868 f .close ()
869869 else :
870- data = await state .http .send_message (channel .id , content , tts = tts , embed = embed , nonce = nonce , mentions = mentions )
870+ data = await state .http .send_message (channel .id , content , tts = tts , embed = embed ,
871+ nonce = nonce , allowed_mentions = allowed_mentions )
871872
872873 ret = state .create_message (channel = channel , data = data )
873874 if delete_after is not None :
0 commit comments