File tree 1 file changed +5
-19
lines changed
1 file changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -626,18 +626,14 @@ async def get_or_fetch(
626
626
The object of type that was specified or ``None`` if not found.
627
627
"""
628
628
from discord import (
629
- AppEmoji ,
630
- CategoryChannel ,
631
629
Client ,
632
- ForumChannel ,
630
+ User ,
633
631
Guild ,
632
+ AppEmoji ,
634
633
GuildEmoji ,
635
634
Member ,
636
- StageChannel ,
637
- TextChannel ,
638
- Thread ,
639
- User ,
640
- VoiceChannel ,
635
+ abc ,
636
+
641
637
)
642
638
643
639
# TODO REMOVE THIS PART AfTER DEPREcIATION
@@ -684,17 +680,7 @@ async def get_or_fetch(
684
680
attr = object_type .__name__ .lower ()
685
681
elif issubclass (object_type , (GuildEmoji , AppEmoji )):
686
682
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 ):
698
684
attr = "channel"
699
685
else :
700
686
raise InvalidArgument (
You can’t perform that action at this time.
0 commit comments