Print debugging :/
This commit is contained in:
parent
c2f0125fb6
commit
123cbce2aa
@ -39,13 +39,12 @@ let getInvites () = async {
|
||||
}
|
||||
|
||||
let createInvite inviter code =
|
||||
connStr
|
||||
|> Sql.connect
|
||||
|> Sql.parameters [ "code" , Sql.string code ; "inviter" , Sql.string (string inviter) ]
|
||||
|> Sql.query "INSERT INTO invite (code, inviter) VALUES (@code, @inviter)"
|
||||
|> Sql.executeNonQueryAsync
|
||||
|> Async.AwaitTask
|
||||
|> Async.Ignore
|
||||
connStr
|
||||
|> Sql.connect
|
||||
|> Sql.parameters [ "code" , Sql.string code ; "inviter" , Sql.string (string inviter) ]
|
||||
|> Sql.query "INSERT INTO invite (code, inviter) VALUES (@code, @inviter)"
|
||||
|> Sql.executeNonQueryAsync
|
||||
|> Async.AwaitTask
|
||||
|
||||
let addInvitedUser did code count =
|
||||
try
|
||||
@ -104,8 +103,12 @@ let createGuildInvite (ctx : IDiscordContext) =
|
||||
// When a player generates an invite code but it hasn't expired, it generates the same code, creating a duplicate entry
|
||||
// so catch the exception thrown because the code column is unique
|
||||
try
|
||||
do! createInvite (ctx.GetDiscordMember().Id) invite.Code
|
||||
with _ -> ()
|
||||
let! result = createInvite (ctx.GetDiscordMember().Id) invite.Code
|
||||
printfn "%A" result
|
||||
return ()
|
||||
with ex ->
|
||||
printfn "%A" ex.Message
|
||||
()
|
||||
|
||||
let embed =
|
||||
DiscordEmbedBuilder()
|
||||
|
Loading…
x
Reference in New Issue
Block a user