Show different message when users are 0

This commit is contained in:
Joseph Ferano 2022-03-21 13:23:33 +07:00
parent 769a7ec504
commit a7fe2c795d

View File

@ -179,9 +179,14 @@ let getInvitedUsersForId (ctx : IDiscordContext) = task {
count <- count + 1
sb.AppendLine($"{count}.) <@{user}>") |> ignore
let msg =
let str =
if users.Length > 0 then
$"**Total Recruited:**`{users.Length} Degenz`\n\n**Total Earned:** `{users.Length * 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()
.AsEphemeral(true)
.WithContent($"**Total Recruited:**`{users.Length} Degenz`\n\n**Total Earned:** `{users.Length * InviteRewardAmount} 💰$GBT `\n\n**Last 10 users recruited:**\n{sb}")
.WithContent(str)
do! ctx.Respond(InteractionResponseType.ChannelMessageWithSource, msg)
}