Skip to content

Commit cd4d3de

Browse files
committed
fix(server_actions): update message handling in create_one_server_action function
1 parent 330d2d3 commit cd4d3de

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/discord/actions/server.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ pub fn build_server_embed(start_time: DateTime<Utc>, info: &ServerInfo, history:
160160
pub async fn create_one_server_action(
161161
start_time: DateTime<Utc>,
162162
ctx: Context<'_>,
163-
reply: ReplyHandle<'_>,
163+
message: &mut Message,
164164
server_info: ServerInfo,
165165
server_history: ServerHistory
166166
) -> Result<(), Error> {
@@ -170,9 +170,6 @@ pub async fn create_one_server_action(
170170
response = response.attachments(EditAttachments::new().add(attachment));
171171
}
172172

173-
// Using the message.edit() because reply.edit() doesn't works correctly with attachments
174-
let mut message = reply.message().await?.into_owned();
175-
176173
message.edit(
177174
&ctx.serenity_context().http,
178175
response.clone().components(build_manage_server_action_row(false, &server_history))

0 commit comments

Comments
 (0)