File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ async def close(ctx):
6565 await ctx .message .delete ()
6666
6767 # Send notification to the thread
68- await channel .send (f"# This was marked as done by { author .mention } " )
68+ await channel .send (f"# This was marked as done by { author .mention } " , suppress_embeds = True )
6969
7070 # We need to archive after adding tags in case it was a forum.
7171 await channel .edit (archived = True )
Original file line number Diff line number Diff line change @@ -105,17 +105,16 @@ async def test_wiki_command():
105105async def test_close_command ():
106106 # Mock context
107107 ctx = AsyncMock ()
108- ctx .channel = discord .Thread ()
109- ctx .channel .parent = discord .ForumChannel ()
110- ctx .author = discord .Member ()
111- ctx .author .mention = "TestUser"
108+ ctx .channel = AsyncMock ()
109+ ctx .message .author = AsyncMock ()
110+ ctx .channel .type = discord .ChannelType .public_thread
112111
113112 # Call the command
114113 await close (ctx )
115114
116115 # Assert that the command sent the expected message
117- ctx .send .assert_called_once_with (
118- "# This was marked as done by {ctx.author.mention}" ,
116+ ctx .channel . send .assert_called_once_with (
117+ f "# This was marked as done by { ctx . message .author .mention } " ,
119118 suppress_embeds = True ,
120119 )
121120
You can’t perform that action at this time.
0 commit comments