From b2b443a50b6350e96d93690cdd277541a2edef09 Mon Sep 17 00:00:00 2001 From: dolfies Date: Mon, 24 Apr 2023 20:40:23 -0400 Subject: [PATCH] Remove unnnecessary Context.reply rewrap --- discord/ext/commands/context.py | 81 --------------------------------- 1 file changed, 81 deletions(-) diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index 145a4f828..1ebea28e1 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -33,8 +33,6 @@ from typing import ( Generic, List, Optional, - overload, - Sequence, TypeVar, Union, ) @@ -51,12 +49,9 @@ if TYPE_CHECKING: from discord.abc import MessageableChannel from discord.commands import MessageCommand - from discord.file import _FileBase from discord.guild import Guild from discord.member import Member - from discord.mentions import AllowedMentions from discord.state import ConnectionState - from discord.sticker import GuildSticker, StickerItem from discord.user import ClientUser, User from discord.voice_client import VoiceProtocol @@ -427,82 +422,6 @@ class Context(discord.abc.Messageable, Generic[BotT]): except CommandError as e: await cmd.on_help_command_error(self, e) - @overload - async def reply( - self, - content: Optional[str] = ..., - *, - tts: bool = ..., - file: _FileBase = ..., - stickers: Sequence[Union[GuildSticker, StickerItem]] = ..., - delete_after: float = ..., - nonce: Union[str, int] = ..., - allowed_mentions: AllowedMentions = ..., - mention_author: bool = ..., - suppress_embeds: bool = ..., - ephemeral: bool = ..., - silent: bool = ..., - ) -> Message: - ... - - @overload - async def reply( - self, - content: Optional[str] = ..., - *, - tts: bool = ..., - files: Sequence[_FileBase] = ..., - stickers: Sequence[Union[GuildSticker, StickerItem]] = ..., - delete_after: float = ..., - nonce: Union[str, int] = ..., - allowed_mentions: AllowedMentions = ..., - mention_author: bool = ..., - suppress_embeds: bool = ..., - ephemeral: bool = ..., - silent: bool = ..., - ) -> Message: - ... - - @overload - async def reply( - self, - content: Optional[str] = ..., - *, - tts: bool = ..., - file: _FileBase = ..., - stickers: Sequence[Union[GuildSticker, StickerItem]] = ..., - delete_after: float = ..., - nonce: Union[str, int] = ..., - allowed_mentions: AllowedMentions = ..., - mention_author: bool = ..., - suppress_embeds: bool = ..., - ephemeral: bool = ..., - silent: bool = ..., - ) -> Message: - ... - - @overload - async def reply( - self, - content: Optional[str] = ..., - *, - tts: bool = ..., - files: Sequence[_FileBase] = ..., - stickers: Sequence[Union[GuildSticker, StickerItem]] = ..., - delete_after: float = ..., - nonce: Union[str, int] = ..., - allowed_mentions: AllowedMentions = ..., - mention_author: bool = ..., - suppress_embeds: bool = ..., - ephemeral: bool = ..., - silent: bool = ..., - ) -> Message: - ... - - @discord.utils.copy_doc(Message.reply) - async def reply(self, content: Optional[str] = None, **kwargs: Any) -> Message: - return await self.message.reply(content, **kwargs) - @discord.utils.copy_doc(Message.message_commands) def message_commands( self,