#๐Ÿ”’ How to make a images autocomplete like this with limit on 10 images?

16 messages ยท Page 1 of 1 (latest)

silver wagon
sudden bronzeBOT
#

@silver wagon

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

winter hornet
#

what do you mean?

rare rover
#

type hint it as discord.Attachment?

#
@app_commands.command()
def foo(self, interaction: discord.Interaction, image: discord.Attachment):
  pass
#

!d discord.Attachment

sudden bronzeBOT
#

class discord.Attachment```
Represents an attachment from Discord.

str(x) Returns the URL of the attachment.

x == y Checks if the attachment is equal to another attachment.

x != y Checks if the attachment is not equal to another attachment.

hash(x) Returns the hash of the attachment.

Changed in version 1.7: Attachment can now be casted to [`str`](https://docs.python.org/3/library/stdtypes.html#str) and is hashable.
silver wagon
#

I try it

rare rover
#

!d discord.File

sudden bronzeBOT
#

class discord.File(fp, filename=None, *, spoiler=..., description=None)```
A parameter object used for [`abc.Messageable.send()`](https://discordpy.readthedocs.io/en/latest/api.html#discord.abc.Messageable.send) for sending file objects.

Note

File objects are single use and are not meant to be reused in multiple [`abc.Messageable.send()`](https://discordpy.readthedocs.io/en/latest/api.html#discord.abc.Messageable.send)s.
rare rover
#

try this one

silver wagon
rare rover
#

set 10 args?

sudden bronzeBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.