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