Fix invited users admin command
This commit is contained in:
parent
0d7efe277d
commit
ea1faaa9a5
@ -242,11 +242,11 @@ let getAttributions userId (ctx : IDiscordContext) =
|
||||
do! ctx.Respond(InteractionResponseType.ChannelMessageWithSource, msg)
|
||||
} :> Task
|
||||
|
||||
let getInvitedUsersForId (ctx : IDiscordContext) =
|
||||
let getInvitedUsersForId (user : DiscordUser) (ctx : IDiscordContext) =
|
||||
task {
|
||||
do! Messaging.defer ctx
|
||||
let! users = getInvitedUsers (ctx.GetDiscordMember().Id)
|
||||
let! total = getInvitedUserCount (ctx.GetDiscordMember().Id)
|
||||
let! users = getInvitedUsers (user.Id)
|
||||
let! total = getInvitedUserCount (user.Id)
|
||||
let sb = StringBuilder()
|
||||
let mutable count = 0
|
||||
for user in users do
|
||||
@ -607,7 +607,8 @@ type Inviter() =
|
||||
|
||||
[<SlashCommand("recruited", "Get total invites from a specific user")>]
|
||||
member this.ListInvitedPeople (ctx : InteractionContext) =
|
||||
getInvitedUsersForId (DiscordInteractionContext ctx)
|
||||
let ictx = DiscordInteractionContext ctx :> IDiscordContext
|
||||
getInvitedUsersForId (ictx.GetDiscordMember()) ictx
|
||||
|
||||
// [<SlashCommand("invites-list", "List all the invites")>]
|
||||
member this.ListServerInvites (ctx : InteractionContext) =
|
||||
|
Loading…
x
Reference in New Issue
Block a user