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):
41
41
@bot .command ()
42
42
async def close (ctx ):
43
43
channel = ctx .channel
44
- parent = channel .parent
45
44
author = ctx .message .author
46
45
47
46
# Check if it's a public or private post (thread)
48
47
if channel .type in (discord .ChannelType .public_thread , discord .ChannelType .private_thread ):
48
+ parent = channel .parent
49
49
50
50
# Check if the post (thread) was sent in a forum,
51
51
# 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():
123
123
# Mock context
124
124
ctx = AsyncMock ()
125
125
ctx .channel = AsyncMock ()
126
- ctx .message .author = AsyncMock ()
127
126
128
127
# Call the command
129
128
await close (ctx )
You can’t perform that action at this time.
0 commit comments