File tree Expand file tree Collapse file tree 2 files changed +1
-2
lines changed Expand file tree Collapse file tree 2 files changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,11 @@ async def wiki(ctx):
4141@bot .command ()
4242async def close (ctx ):
4343 channel = ctx .channel
44- parent = channel .parent
4544 author = ctx .message .author
4645
4746 # Check if it's a public or private post (thread)
4847 if channel .type in (discord .ChannelType .public_thread , discord .ChannelType .private_thread ):
48+ parent = channel .parent
4949
5050 # Check if the post (thread) was sent in a forum,
5151 # so we can add a tag
Original file line number Diff line number Diff line change @@ -123,7 +123,6 @@ async def test_close_command_notworking():
123123 # Mock context
124124 ctx = AsyncMock ()
125125 ctx .channel = AsyncMock ()
126- ctx .message .author = AsyncMock ()
127126
128127 # Call the command
129128 await close (ctx )
You can’t perform that action at this time.
0 commit comments