Skip to content

Commit 0baae1d

Browse files
authored
usage of abc
Signed-off-by: Lumouille <[email protected]>
1 parent 9e45627 commit 0baae1d

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

discord/utils.py

+5-19
Original file line numberDiff line numberDiff line change
@@ -626,18 +626,14 @@ async def get_or_fetch(
626626
The object of type that was specified or ``None`` if not found.
627627
"""
628628
from discord import (
629-
AppEmoji,
630-
CategoryChannel,
631629
Client,
632-
ForumChannel,
630+
User,
633631
Guild,
632+
AppEmoji,
634633
GuildEmoji,
635634
Member,
636-
StageChannel,
637-
TextChannel,
638-
Thread,
639-
User,
640-
VoiceChannel,
635+
abc,
636+
641637
)
642638

643639
# TODO REMOVE THIS PART AfTER DEPREcIATION
@@ -684,17 +680,7 @@ async def get_or_fetch(
684680
attr = object_type.__name__.lower()
685681
elif issubclass(object_type, (GuildEmoji, AppEmoji)):
686682
attr = "emoji"
687-
elif issubclass(
688-
object_type,
689-
(
690-
VoiceChannel,
691-
TextChannel,
692-
ForumChannel,
693-
StageChannel,
694-
CategoryChannel,
695-
Thread,
696-
),
697-
):
683+
elif issubclass(object_type, abc.GuildChannel):
698684
attr = "channel"
699685
else:
700686
raise InvalidArgument(

0 commit comments

Comments
 (0)