mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-12-03 14:02:19 +00:00
Remove generic from Interaction and ConnectionState
This results in poor ergonomics due to the lack of default generics for the common case. For most users this ends up in a degraded experience since the type will resolve to Unknown rather than at the very least a Client.
This commit is contained in:
@@ -77,7 +77,6 @@ from .threads import Thread
|
||||
from .sticker import GuildSticker, StandardSticker, StickerPack, _sticker_factory
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing_extensions import Self
|
||||
from .types.guild import Guild as GuildPayload
|
||||
from .abc import SnowflakeTime, Snowflake, PrivateChannel
|
||||
from .guild import GuildChannel
|
||||
@@ -255,7 +254,7 @@ class Client:
|
||||
}
|
||||
|
||||
self._enable_debug_events: bool = options.pop('enable_debug_events', False)
|
||||
self._connection: ConnectionState[Self] = self._get_state(**options)
|
||||
self._connection: ConnectionState = self._get_state(**options)
|
||||
self._connection.shard_count = self.shard_count
|
||||
self._closed: bool = False
|
||||
self._ready: asyncio.Event = asyncio.Event()
|
||||
|
||||
Reference in New Issue
Block a user