From 6684bd1832068a90147ff76c8a0433f0b6cbffc4 Mon Sep 17 00:00:00 2001 From: Aadi Desai <21363892+supleed2@users.noreply.github.com> Date: Sun, 15 Oct 2023 15:35:27 +0100 Subject: [PATCH] Fix `refresh_non_members` command Add `defer` to prevent timeout --- src/cmds/edit_members.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmds/edit_members.rs b/src/cmds/edit_members.rs index c42a368..d10c2c7 100644 --- a/src/cmds/edit_members.rs +++ b/src/cmds/edit_members.rs @@ -94,6 +94,7 @@ pub(crate) async fn edit_member_fresher( pub(crate) async fn refresh_non_members(ctx: ACtx<'_>) -> Result<(), Error> { use serenity::futures::StreamExt; tracing::info!("{}", ctx.author().name); + ctx.defer().await?; let mut members = ctx.data().server.members_iter(ctx.http()).boxed(); let mut cnt = 0; while let Some(Ok(mut m)) = members.next().await {