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):
65
65
await ctx .message .delete ()
66
66
67
67
# 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 )
69
69
70
70
# We need to archive after adding tags in case it was a forum.
71
71
await channel .edit (archived = True )
Original file line number Diff line number Diff line change @@ -105,17 +105,16 @@ async def test_wiki_command():
105
105
async def test_close_command ():
106
106
# Mock context
107
107
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
112
111
113
112
# Call the command
114
113
await close (ctx )
115
114
116
115
# 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 } " ,
119
118
suppress_embeds = True ,
120
119
)
121
120
You can’t perform that action at this time.
0 commit comments