@@ -521,13 +521,17 @@ async def _edit(
521521 )
522522 elif isinstance (default_reaction_emoji , str ):
523523 default_reaction_emoji = PartialEmoji .from_str (default_reaction_emoji )
524+ elif default_reaction_emoji is None :
525+ pass
524526 else :
525527 raise InvalidArgument (
526- "default_reaction_emoji must be of type: GuildEmoji | int | str"
528+ "default_reaction_emoji must be of type: GuildEmoji | int | str | None "
527529 )
528530
529531 options ["default_reaction_emoji" ] = (
530532 default_reaction_emoji ._to_forum_reaction_payload ()
533+ if default_reaction_emoji
534+ else None
531535 )
532536
533537 if options :
@@ -1493,9 +1497,9 @@ async def send(
14931497 .. versionadded:: 1.4
14941498
14951499 reference: Union[:class:`~discord.Message`, :class:`~discord.MessageReference`, :class:`~discord.PartialMessage`]
1496- A reference to the :class:`~discord.Message` to which you are replying, this can be created using
1497- :meth:`~discord.Message.to_reference` or passed directly as a :class:`~discord.Message`. You can control
1498- whether this mentions the author of the referenced message using the
1500+ A reference to the :class:`~discord.Message` being replied to or forwarded. This can be created using
1501+ :meth:`~discord.Message.to_reference`.
1502+ When replying, you can control whether this mentions the author of the referenced message using the
14991503 :attr:`~discord.AllowedMentions.replied_user` attribute of ``allowed_mentions`` or by
15001504 setting ``mention_author``.
15011505
@@ -1585,9 +1589,19 @@ async def send(
15851589 allowed_mentions = allowed_mentions or AllowedMentions ().to_dict ()
15861590 allowed_mentions ["replied_user" ] = bool (mention_author )
15871591
1592+ _reference = None
15881593 if reference is not None :
15891594 try :
1590- reference = reference .to_message_reference_dict ()
1595+ _reference = reference .to_message_reference_dict ()
1596+ from .message import MessageReference
1597+
1598+ if not isinstance (reference , MessageReference ):
1599+ utils .warn_deprecated (
1600+ f"Passing { type (reference ).__name__ } to reference" ,
1601+ "MessageReference" ,
1602+ "2.7" ,
1603+ "3.0" ,
1604+ )
15911605 except AttributeError :
15921606 raise InvalidArgument (
15931607 "reference parameter must be Message, MessageReference, or"
@@ -1637,7 +1651,7 @@ async def send(
16371651 nonce = nonce ,
16381652 enforce_nonce = enforce_nonce ,
16391653 allowed_mentions = allowed_mentions ,
1640- message_reference = reference ,
1654+ message_reference = _reference ,
16411655 stickers = stickers ,
16421656 components = components ,
16431657 flags = flags .value ,
@@ -1656,7 +1670,7 @@ async def send(
16561670 nonce = nonce ,
16571671 enforce_nonce = enforce_nonce ,
16581672 allowed_mentions = allowed_mentions ,
1659- message_reference = reference ,
1673+ message_reference = _reference ,
16601674 stickers = stickers ,
16611675 components = components ,
16621676 flags = flags .value ,
0 commit comments