File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ async def _chatrole_start(
5353 self ,
5454 interaction : discord .Interaction ,
5555 role : discord .Role ,
56- channel_or_catagories : typing .Union [discord .TextChannel , discord .CategoryChannel ],
56+ channel_or_catagory : typing .Union [discord .TextChannel , discord .CategoryChannel ],
5757 notify_users : bool ,
5858 ):
5959 if self .active :
@@ -63,13 +63,12 @@ async def _chatrole_start(
6363 self .role = role .id
6464 self .ids = {'text' : [], 'cat' : []}
6565
66- for channel in [channel_or_catagories ]:
67- if isinstance (channel , discord .channel .TextChannel ):
68- self .ids ['text' ].append (channel .id )
69- elif isinstance (channel , discord .channel .CategoryChannel ):
70- self .ids ['cat' ].append (channel .id )
71- else :
72- return await interaction .response .send_message (f'{ config .redTick } Invalid channel type: { channel } ' )
66+ if isinstance (channel_or_catagory , discord .channel .TextChannel ):
67+ self .ids ['text' ].append (channel_or_catagory .id )
68+ elif isinstance (channel_or_catagory , discord .channel .CategoryChannel ):
69+ self .ids ['cat' ].append (channel_or_catagory .id )
70+ else :
71+ return await interaction .response .send_message (f'{ config .redTick } Invalid channel type: { channel } ' )
7372
7473 self .active = True
7574 return await interaction .response .send_message (
You can’t perform that action at this time.
0 commit comments