Sending Images using Discord.py
Тәжірибелік нұсқаулар және стиль
Synthetic Everything demonstrates how to send files using Discord.py
View the code on GitHub:
github.com/Sidpatchy/Discord-...
Have A Suggestion For A New Video Comment Below And I Will Get Back To You As Soon As Possible!
I post my videos on lbry.tv: lbry.tv/@SyntheticEverything:8
My lbry invite link: lbry.tv/$/invite/@SyntheticEv...
Check out my website: https:syntheticmediagroup.com/
Consider Joining Our Discord - / discord
If the discord invite doesn't work check our website or my channel's about tab for an updated link.
Outro Music:
"My Luck," by Broke For Free
Please answer this form about our channels: goo.gl/forms/AR2bYv1UUKJPfHs63
Пікірлер: 43
WARNING: if you're using Visual Studio Code or something else and running the code in the Terminal and it says Errno 2 [FileNotFound], the fix to it is running the file in the actually file instead of the terminal (what I mean is double clicking the file instead of running it in the bulit in terminal)
@ztin4532
2 жыл бұрын
can u explain it?, i cannot understand, i double clicked the image file, and its open, but once i tried it again it still doesnt work
@ztin4532
2 жыл бұрын
also and i use replit
@zacky_code
2 жыл бұрын
@@ztin4532 I’m talking about vscode, not replit, try putting the image in the same dir as main.py
@NoahXD257
2 жыл бұрын
saved me, love you bro
@N0OBB
Жыл бұрын
basically, just open the folder the main file is in
How would I be able to send a random image from a list?
Great vid
Using an exact copy of the code I'm getting an error 'typeerror: _context.send() got an unexpected keyword argument 'file'' Did discordpy discontinue this specific function or is there something else I'm missing?
Is there any possible way to my the image embeded?
just gives me an error after i run !test the second time
ty bro
By using your code, I can get ! Hello, but I can get Image:( I am using Mac, can I know how to fix it:(
What is the bot run link? I’m new
is there a way to have the bot send whatever a user sends after the command "!test"?
@mo.alaidaroos
2 жыл бұрын
yes there is:- @bot.command() async def test(ctx, *, message): await ctx.send(message)
it doesnt work💔
Guys if you get an error for not using the visual studio code program. put your audio/image/video file in the same folder where your script is
What if i'm getting filenotfound upon running this command? The name is spelled right and everything, but my png isn't being found
@Antek1234l
3 жыл бұрын
you probably must put this file where bot.py is located
@dhruvlohar8859
3 жыл бұрын
crosscheck check the spelling and the path or else run the python script in the directory the png is present :) Hope this helps!
@bingusspaceprogram
2 жыл бұрын
run the program directly, that fixes the problem
how to send without command just directly
@ausnix8798
2 жыл бұрын
dont add a prefix lmao , at the top when it says (command_prefix="!") just replace ! with so it would look like (command_prefix="") the only reason people dont add this is because just one word will trigger the command
what if you only have a link for the image
@VoidAstraI
3 күн бұрын
use the link
Does it have to be a png?
@zacky_code
3 жыл бұрын
nope
@ZackTheDev0101
3 жыл бұрын
Haha, Thanks for the quick answer xd I haven't had anything to do with it for a long time
Is it possible to send an image with its url
@brotatochips2473
3 жыл бұрын
yes
@lookboy478
3 жыл бұрын
@@brotatochips2473 how?
it says discord is not defined
@junba1810
9 ай бұрын
did you use 'import discord' at the top lines of your code?
FileNotFoundError
@Antek1234l
3 жыл бұрын
File must be in the same location as your bot.py
My brother in Christ, you have put your bot's public token in a youtube video and pressed upload. I'm sure you've changed it by now but....
@SyntheticEverything
Жыл бұрын
That was reset before the video got uploaded... I didn't feel like going through the effort of blurring it at the time.
File not found error :(
@dheeraj2008-alt
3 жыл бұрын
crosscheck check the spelling and the path or else run the python script in the directory the png is present :) Hope this helps!
what if I want my bot to send a bunch of pictures attached to the same message ?