- Notifications
You must be signed in to change notification settings - Fork590
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
BetaWas this translation helpful?Give feedback.
All reactions
Answered by msiemensJan 11, 2023
Would something like this fork for you?
results=db.search(User.id==ctx.options.member)ifresults== []:awaitctx.respond("User doesn't exist... adding to database.")db.insert({"id":ctx.options.member,"bal":0})else:awaitctx.respond(results[0].bal)
Replies: 1 comment 3 replies
-
Would something like this fork for you? results=db.search(User.id==ctx.options.member)ifresults== []:awaitctx.respond("User doesn't exist... adding to database.")db.insert({"id":ctx.options.member,"bal":0})else:awaitctx.respond(results[0].bal) |
BetaWas this translation helpful?Give feedback.
All reactions
3 replies
-
I got the error, |
BetaWas this translation helpful?Give feedback.
All reactions
-
Ah, that's my fault. Try this instead: results=db.search(User.id==ctx.options.member)ifresults== []:awaitctx.respond("User doesn't exist... adding to database.")db.insert({"id":ctx.options.member,"bal":0})else:awaitctx.respond(results[0]['bal']) |
BetaWas this translation helpful?Give feedback.
All reactions
-
This worked, thank you :) |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1
Answer selected byBrncray
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
