From b2107b6664489eef50b2f013f8b331777c749f4b Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Tue, 5 Apr 2022 12:58:58 +0700 Subject: [PATCH] Defer --- Bot/InviteTracker.fs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Bot/InviteTracker.fs b/Bot/InviteTracker.fs index 8297df7..d34d64a 100644 --- a/Bot/InviteTracker.fs +++ b/Bot/InviteTracker.fs @@ -244,6 +244,7 @@ let getAttributions userId (ctx : IDiscordContext) = let getInvitedUsersForId (ctx : IDiscordContext) = task { + do! Messaging.defer ctx let! users = getInvitedUsers (ctx.GetDiscordMember().Id) let! total = getInvitedUserCount (ctx.GetDiscordMember().Id) let sb = StringBuilder() @@ -257,10 +258,10 @@ let getInvitedUsersForId (ctx : IDiscordContext) = $"**Total Recruited:** `{total} Degenz`\n**Total Earned:** `{total * InviteRewardAmount} 💰$GBT`\n\n**Last 10 users recruited:**\n{sb}" else $"You haven't recruited anyone yet, use the `/recruit` command to get the recruitment link" - DiscordInteractionResponseBuilder() + DiscordFollowupMessageBuilder() .AsEphemeral(true) .WithContent(str) - do! ctx.Respond(InteractionResponseType.ChannelMessageWithSource, msg) + do! ctx.FollowUp(msg) let user = ctx.GetDiscordMember() let channel = ctx.GetChannel() do! Analytics.recruitedCommand total user.Id user.Username channel