Browse Source

Remove unnnecessary Context.reply rewrap

pull/10109/head
dolfies 2 years ago
parent
commit
b2b443a50b
  1. 81
      discord/ext/commands/context.py

81
discord/ext/commands/context.py

@ -33,8 +33,6 @@ from typing import (
Generic, Generic,
List, List,
Optional, Optional,
overload,
Sequence,
TypeVar, TypeVar,
Union, Union,
) )
@ -51,12 +49,9 @@ if TYPE_CHECKING:
from discord.abc import MessageableChannel from discord.abc import MessageableChannel
from discord.commands import MessageCommand from discord.commands import MessageCommand
from discord.file import _FileBase
from discord.guild import Guild from discord.guild import Guild
from discord.member import Member from discord.member import Member
from discord.mentions import AllowedMentions
from discord.state import ConnectionState from discord.state import ConnectionState
from discord.sticker import GuildSticker, StickerItem
from discord.user import ClientUser, User from discord.user import ClientUser, User
from discord.voice_client import VoiceProtocol from discord.voice_client import VoiceProtocol
@ -427,82 +422,6 @@ class Context(discord.abc.Messageable, Generic[BotT]):
except CommandError as e: except CommandError as e:
await cmd.on_help_command_error(self, 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) @discord.utils.copy_doc(Message.message_commands)
def message_commands( def message_commands(
self, self,

Loading…
Cancel
Save