diff --git a/intbot/core/bot/main.py b/intbot/core/bot/main.py index 4dd0c6f..c6e8584 100644 --- a/intbot/core/bot/main.py +++ b/intbot/core/bot/main.py @@ -41,11 +41,11 @@ async def wiki(ctx): @bot.command() async def close(ctx): channel = ctx.channel - parent = channel.parent author = ctx.message.author # Check if it's a public or private post (thread) if channel.type in (discord.ChannelType.public_thread, discord.ChannelType.private_thread): + parent = channel.parent # Check if the post (thread) was sent in a forum, # so we can add a tag diff --git a/intbot/tests/test_bot/test_main.py b/intbot/tests/test_bot/test_main.py index 393bc37..ea3517e 100644 --- a/intbot/tests/test_bot/test_main.py +++ b/intbot/tests/test_bot/test_main.py @@ -123,7 +123,6 @@ async def test_close_command_notworking(): # Mock context ctx = AsyncMock() ctx.channel = AsyncMock() - ctx.message.author = AsyncMock() # Call the command await close(ctx)