Defer
This commit is contained in:
parent
0e77c26b82
commit
b2107b6664
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user