This commit is contained in:
Joseph Ferano 2022-04-05 12:58:58 +07:00
parent 0e77c26b82
commit b2107b6664

View File

@ -244,6 +244,7 @@ let getAttributions userId (ctx : IDiscordContext) =
let getInvitedUsersForId (ctx : IDiscordContext) = let getInvitedUsersForId (ctx : IDiscordContext) =
task { task {
do! Messaging.defer ctx
let! users = getInvitedUsers (ctx.GetDiscordMember().Id) let! users = getInvitedUsers (ctx.GetDiscordMember().Id)
let! total = getInvitedUserCount (ctx.GetDiscordMember().Id) let! total = getInvitedUserCount (ctx.GetDiscordMember().Id)
let sb = StringBuilder() 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}" $"**Total Recruited:** `{total} Degenz`\n**Total Earned:** `{total * InviteRewardAmount} 💰$GBT`\n\n**Last 10 users recruited:**\n{sb}"
else else
$"You haven't recruited anyone yet, use the `/recruit` command to get the recruitment link" $"You haven't recruited anyone yet, use the `/recruit` command to get the recruitment link"
DiscordInteractionResponseBuilder() DiscordFollowupMessageBuilder()
.AsEphemeral(true) .AsEphemeral(true)
.WithContent(str) .WithContent(str)
do! ctx.Respond(InteractionResponseType.ChannelMessageWithSource, msg) do! ctx.FollowUp(msg)
let user = ctx.GetDiscordMember() let user = ctx.GetDiscordMember()
let channel = ctx.GetChannel() let channel = ctx.GetChannel()
do! Analytics.recruitedCommand total user.Id user.Username channel do! Analytics.recruitedCommand total user.Id user.Username channel