File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,22 +38,14 @@ async def tunnel(
3838 self ,
3939 ctx : commands .Context ,
4040 destination_channel : discord .TextChannel | None ,
41- source_channel : discord .TextChannel | None ,
4241 ) -> None :
4342 """Creates a tunnel."""
4443 if destination_channel is None :
4544 least_active_channel_id = self .get_least_active_channel_id (ctx .channel .id )
4645 least_active_channel = await ctx .guild .fetch_channel (least_active_channel_id )
4746 destination_channel = least_active_channel
4847
49- if source_channel is None :
50- if not isinstance (ctx .channel , discord .TextChannel ):
51- raise BadArgument (
52- f"The current channel of type '{ ctx .channel .type } ' is not a valid source channel "
53- "and no explicit source channel was provided"
54- )
55-
56- source_channel = ctx .channel
48+ source_channel = ctx .channel
5749
5850 if not source_channel .permissions_for (ctx .author ).send_messages :
5951 raise BadArgument (f"You don't have permission to send messages in { source_channel .jump_url } " )
You can’t perform that action at this time.
0 commit comments