From 4b2c2b231d1eb19e515f4de3281342ebf4fe9932 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 7 Mar 2022 18:05:43 -0500 Subject: [PATCH] Fix type checker errors in Connectable and Messageable --- discord/abc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/discord/abc.py b/discord/abc.py index d01b40fcf..80e1f3068 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -1250,7 +1250,7 @@ class Messageable: self, content=None, *, - tts=None, + tts=False, embed=None, embeds=None, file=None, @@ -1735,7 +1735,8 @@ class Connectable(Protocol): if cls is MISSING: cls = VoiceClient - voice = cls(client, self) + # The type checker doesn't understand that VoiceClient *is* T here. + voice: T = cls(client, self) # type: ignore if not isinstance(voice, VoiceProtocol): raise TypeError('Type must meet VoiceProtocol abstract base class.')