#i want to await ctx.respond("jsp sah") for first async
1 messages · Page 1 of 1 (latest)
Why there's a random decorator inside the function?
for slash command option
Why is your autocomplete function inside the function?
Why is your autocomplete function async?
That's not how decorators work.
oh
could you help me to make it right ?
@queen lintel
https://github.com/Pycord-Development/pycord/blob/master/examples/app_commands/slash_autocomplete.py
Pycord, a maintained fork of discord.py, is a python wrapper for the Discord API - pycord/slash_autocomplete.py at master · Pycord-Development/pycord
but the option i want depends on the customer option
@queen lintel i need to get customer id to make the invoice option
God sake, you only need to ping me once
I ain't a robot
The syntac of the autocomplete is the same. Look at the documentation and see what you can use. I can tell you you can check for options before that one.
.rtfm AutocompleteContext
.rtfm AutocompleteContext
@queen lintel could you give me an example please ?
Just make an attempt by reading and understand
I can't give you an example right now
AutocompleteContext.options is a dict of the options the user has already filled before, get the value for the customer key
.lp
Official Beginner's Guide: https://wiki.python.org/moin/BeginnersGuide
Official Tutorial: https://docs.python.org/3/tutorial/
Shortcuts:
https://wiki.python.org/moin/BeginnersGuide/NonProgrammers
https://wiki.python.org/moin/BeginnersGuide/Programmers
Learn Python:
https://automatetheboringstuff.com/ (for complete beginners to programming)
https://learnxinyminutes.com/docs/python3/ (for people who know programming already)
https://docs.python.org/3/tutorial/ (official tutorial)
http://python.swaroopch.com/ (useful book)
http://www.codeabbey.com/ (exercises for beginners)
@mossy dune
.solved