Show different message when users are 0
This commit is contained in:
parent
769a7ec504
commit
a7fe2c795d
@ -179,9 +179,14 @@ let getInvitedUsersForId (ctx : IDiscordContext) = task {
|
|||||||
count <- count + 1
|
count <- count + 1
|
||||||
sb.AppendLine($"{count}.) <@{user}>") |> ignore
|
sb.AppendLine($"{count}.) <@{user}>") |> ignore
|
||||||
let msg =
|
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()
|
DiscordInteractionResponseBuilder()
|
||||||
.AsEphemeral(true)
|
.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)
|
do! ctx.Respond(InteractionResponseType.ChannelMessageWithSource, msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user