Skip to content
← Back to Community
Discord bot images
Profile icon
AqualRodinia

Im trying to open images in discord from the repl and i need some help.

Voters
Profile icon
XIVAL
Profile icon
Rochita
Profile icon
gabotupia1
Profile icon
AqualRodinia
Comments
hotnewtop
Profile icon
PattanAhmed

@AqualRodinia Hi Mason,
You can try this commands below:-

import os # it will print all files in that folder print(os.listdir('folder path of the images')) # it will print True of False if the file exists with this path print(os.path.isfile('absolute path of the image'))

With my best wishes
Hope this helps
Please mark my answer if this helps.

Profile icon
DEMONul1234

maybe try: os.path.expanduser("Enter path here")
It can be used to import image.