How to Create a Discord Music Bot [Python]

  Рет қаралды 26,244

CreepyD

CreepyD

2 жыл бұрын

How to Create a Discord Music Bot [Python] (discord.py music bot tutorial)
In this Discord Music Bot Tutorial, I'll be showing you how to create a music bot using discord.py. Our bot will be able to stream music instead of downloading the full song and storing it on your computer as a file.
Support me on Patreon - / creepyd
Code (GitHub) - github.com/CreepyD246/discord...
____________
USEFUL LINKS & DOCUMENTATIONS:
Discord Developer Portal - / discord
How to Download and Set Up Python - • How to Download Python...
Discord Python Documentation - discordpy.readthedocs.io/en/s...
Discord Bot Setup Video - • How to Create a Discor...
FFmpeg Download Page - ffmpeg.org/download.html
̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅
____________
OTHER TUTORIALS:
How to Create a Discord Bot [Setup Video] - • How to Create a Discor...
How to Create a Discord Moderation Bot - • How to Create a Discor...
̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅
____________
OTHER MEDIA:
Instagram - / creepyd_studios
Twitter - / creepyd_studios
Discord - / discord
Itch.io - creepyd.itch.io
̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅

Пікірлер: 98
@FlockersDesign
@FlockersDesign Жыл бұрын
quik note he did this : C:\ffmpeg\bin this is not correct because he renamed the bin folder to ffmpeg keep this in mind so do this instead C:\ffmpeg\
@CreepyD246
@CreepyD246 Жыл бұрын
I hadn't realized that until now, thanks for letting me know
@jgplayz
@jgplayz Жыл бұрын
just go to the bin folder location, right click the location bar and copy address as text, then paste it in the variables
@novianpontifex3820
@novianpontifex3820 10 ай бұрын
i thought so it seemed weird to me thank you for saying this
@pavanpurohit999
@pavanpurohit999 4 ай бұрын
we have to copy program files location or downloads location ?? my bot is not joining the voice channel how to solve it ??
@FlockersDesign
@FlockersDesign 4 ай бұрын
@@pavanpurohit999 that is because this video is outdated
@mega7269
@mega7269 Жыл бұрын
Hey, so I tried to implement this system into an existing discord bot with minimal modules and when i try to play soemthing on discord, it says in the terminal "ffmpeg process 24 should have terminated with a return code of -9"
@bryanmantell
@bryanmantell 2 жыл бұрын
I keep getting a "source must be an AudioSource not FFmpegPCMAudio" error when I try to play youtube audio or a separate, already downloaded, .mp3 file... Any thoughts?
@luboisfat
@luboisfat Жыл бұрын
Great tutorial, thanks a bunch, hope you find friends.
@CreepyD246
@CreepyD246 Жыл бұрын
Thanks man
@piguinos3348
@piguinos3348 Жыл бұрын
for some reason the bot doesn't joins the channel there are to problems or errors can somebody help me
@aaronrichardson3148
@aaronrichardson3148 3 ай бұрын
same here, cant get the bot to join the voice channel
@timcre6166
@timcre6166 2 жыл бұрын
nice easy to understand vid
@godlyvideos2379
@godlyvideos2379 6 ай бұрын
how would I turn this into a cog function with a / slash command instead of the ? prefix you have
@leventekalocsai8113
@leventekalocsai8113 Жыл бұрын
tried to use ?play (link) command, but in terminal of VS it says: “ffmpeg process 520 should have terminated with a return code of -9.”
@Raizelen
@Raizelen Жыл бұрын
Good tutorial
@brannn69
@brannn69 Жыл бұрын
my bot could join voice channel and send back video info but no audio, terminal says: 'VoiceClient' object does not support item assignment.
@xarkata9682
@xarkata9682 2 жыл бұрын
I have a problem the bot joins but not play the video the erorr is 'VoiceClient' object does not support item assignment
@uniquename3929
@uniquename3929 Жыл бұрын
I got an issue because the ffmpeg was not found even tho I set the directory to C:\ffmpeg\ mind helping me out?
@Jsjdndne
@Jsjdndne Жыл бұрын
I did everything as it should be but the bot does not want to join the voice channel
@NikO-jp6vs
@NikO-jp6vs 19 күн бұрын
Donwloading webpage 'url' update: now it says ffmpeg process xxxxx successfully terminated with the return code of 1 but no music was played in the bot
@pony328
@pony328 Жыл бұрын
the bot says its online but it wont join the chats or play please help everything appears to be working
@jonasbang3918
@jonasbang3918 2 жыл бұрын
are you going to add queue?
@herbertendrian4638
@herbertendrian4638 2 жыл бұрын
Bro, I'm currently having an audio problem with my bot. I use the FFmpegPCMAudio() function to play a song on my bot, with the source file downloaded first (not the stream url). I have a problem with the audio quality of the bot that is not clear, sometimes it breaks, sometimes it's too fast, sometimes it's too slow. My bot is hosted on a DigitalOcean server with a 1/1 configuration. The internet server connection is quite fast, but the audio streaming is also not smooth. Is there any solution for this? I've googled this solution, but never found an answer to this problem 🥲
@clovekneznamy8793
@clovekneznamy8793 2 жыл бұрын
I tried it too but there is no solution
@ducklifee_6260
@ducklifee_6260 2 жыл бұрын
Use yt_dlp not youtube_dl
@roger724
@roger724 2 жыл бұрын
why does it say error [youtube] BSDPQ1uP7GI: Downloading webpage ffmpeg was not found.
@CreepyD246
@CreepyD246 Жыл бұрын
Sorry about the error, I only now realized an error in my tutorial. Check the pinned comment
@Jochem2502
@Jochem2502 Жыл бұрын
If i typ ?play [URL] its not joining the vc?
@aswinbabu1630
@aswinbabu1630 Жыл бұрын
can anyone help to find ffmpeg exe for linux having problem while running in server
@Polokalap
@Polokalap Жыл бұрын
THX
@fr0zzy997
@fr0zzy997 Жыл бұрын
had to make a few adjustments and add some stuff but it worked! could you maybe do a tutorial how to make a queue system so that it can load and ready more songs as 1 is playing?
@TWJamesSS
@TWJamesSS Жыл бұрын
uhm can you possibly tell me all the adjustments bc it would really help
@fr0zzy997
@fr0zzy997 Жыл бұрын
@@TWJamesSS No problem, had to put the all music commands under the same bot.event for it to work with other codes. then I came accross a problem where the song/bot disconnects after like a minute so i added ffmpeg_options = {'options': "-vn", "before_options": "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5"} on the ffmpeg. I don't remember all the adjustment but ill be more than happy to send my bot's code to u by email. im using pycharm if that matters
@TWJamesSS
@TWJamesSS Жыл бұрын
@@fr0zzy997 Thanks a tonne you're a life saver
@sethr2b966
@sethr2b966 Жыл бұрын
@@fr0zzy997 can i also receive some help?
@fr0zzy997
@fr0zzy997 Жыл бұрын
@@sethr2b966 send me ur email and ill send u the code that I have, hopefully itll help
@Kr1nxx
@Kr1nxx 2 жыл бұрын
how do I make it loop or skip? I dont know how xd
@MrLeon0
@MrLeon0 2 жыл бұрын
i keep getting this error [youtube] C2gSvt0LNSs: Downloading webpage 'dict' object is not callable
@sethy3055
@sethy3055 2 жыл бұрын
I also get stuck on the downloading webpage step, but it is not throwing me any errors
@hershey6171
@hershey6171 Жыл бұрын
bot doesnt join the channel
@shineori4078
@shineori4078 2 жыл бұрын
I just realized you barely have any comments or likes and I have on idea why, this is something I've been trying to do for quite a while and gave up every single time until I came across your video. Literally 30? 40? mins of work and everything just worked without any hiccups. The only one thing I had a question on was what if I wanted to run this one the cloud? everything works as it should except for when I try to play a song, it gives me an error message of not having FFMPEG, which I don't because I don't have FFMpeg installed on the cloud. Is the way I would combat that just simply installing ffmpeg and following what you did at 6:10? (linking the directory) also, if its relevant, the cloud I would be using is googles and I think its linux based so I'm not sure if that would interfere with the process in any way
@CreepyD246
@CreepyD246 2 жыл бұрын
Sorry for my late response. Yes, you would just need to pass the path to ffmpeg in the executable argument (like I did at 6:10). Also, I don't believe Linux would interfere with anything, but if it does let me know. I don't use Linux much though, unfortunately, so I wouldn't be able to solve your problem instantly, but I guess that's why we have Google. I'll help you search for answers online if I don't immediately know the answer. Also, thank you for the kind words.
@shineori4078
@shineori4078 2 жыл бұрын
@@CreepyD246 Gotcha! Thank you so much for you response, I'll comment back here in case there's any hiccups and if I was able to come to a solution.
@JhonDaid_JD
@JhonDaid_JD 2 ай бұрын
Good morning, I have a problem that I still can't solve and that is that the code and the bot work, but the music cannot be heard, could you please help me?
@CreepyD246
@CreepyD246 2 ай бұрын
Make sure to install and setup FFMPEG correctly. Check the pinned comment for some info on it, I made a small mistake in my tutorial
@CreepyD246
@CreepyD246 2 ай бұрын
Remember NOT to share your API keys/tokens
@saidesandreas
@saidesandreas Жыл бұрын
its says in line 9 that is missing intents
@EliasFYHP
@EliasFYHP Жыл бұрын
It don’t work the bot join the voice channel but it doesn’t play the music
@milliestan
@milliestan Жыл бұрын
can you make a tutorial there you can like add songs in a queue?
@phazedrl
@phazedrl Жыл бұрын
I’m trying to send my discord but it appears my comment keeps getting removed. If you need help with this let me know I got it figured out
@KaidaForever
@KaidaForever Жыл бұрын
I keep getting this: ffmpeg process "random numbers" should have terminated with a return code of 1. Also the bot doesnt join
@KaidaForever
@KaidaForever Жыл бұрын
also if i remove the expect print error it gives me: PyNaCl library needed in order to use voice
@sleshkatplays849
@sleshkatplays849 2 жыл бұрын
I tried to use ?play (link) command, but in terminal of VS it says: “ffmpeg not found”
@CreepyD246
@CreepyD246 2 жыл бұрын
Download ffmpeg. Make sure to do each step in the tutorial
@sleshkatplays849
@sleshkatplays849 2 жыл бұрын
@@CreepyD246 thanks, It helped a little,
@slaughter420
@slaughter420 2 жыл бұрын
Downloading webpage ffmpeg was not found. i have this error
@CreepyD246
@CreepyD246 Жыл бұрын
Sorry about this. Check the pinned comment
@sethy3055
@sethy3055 2 жыл бұрын
Could it be possible to add a queue to this bot? Because if it's already playing a song, you need to wait until its over to play something.
@user-yj8di6kz5s
@user-yj8di6kz5s 2 жыл бұрын
the dude putting 10h bass boosts:
@phazedrl
@phazedrl Жыл бұрын
Yeah it’s possible. Do you still need help with this? I figured out how to
@Fooleiras
@Fooleiras Жыл бұрын
@@phazedrl what is your solution?
@phazedrl
@phazedrl Жыл бұрын
I’ve been trying to send my discord to elaborate on my solution but it’s keeps deleting my comment. Do you want me to just publish code on this comment thread?
@phazedrl
@phazedrl Жыл бұрын
@@Fooleirasforgot to mention you on the comment I made
@theshark9001
@theshark9001 11 ай бұрын
The bot joins, but no music plays. How do I fix this?
@CreepyD246
@CreepyD246 10 ай бұрын
Make sure you downloaded and set ffmpeg up correctly
@fantasypvp
@fantasypvp 2 жыл бұрын
it says in terminal "[youtube] LrL8_b3LZLM: Downloading webpage" but no sound plays
@phazedrl
@phazedrl Жыл бұрын
Do you still need help with this?
@fantasypvp
@fantasypvp Жыл бұрын
@@phazedrl LOL, what a coincidence, I just started rewriting my discord bot after not working on it for 6 months lmao
@phazedrl
@phazedrl Жыл бұрын
@@fantasypvp eyyy nice hahaha. I tried sending my discord and it got automatically deleted. Unsure how to share my contact infor
@SpaceSp3ctrum
@SpaceSp3ctrum 2 жыл бұрын
it doesn't work
@Verwiesen
@Verwiesen 2 жыл бұрын
could you maybe show how to queue and maybe search songs ?
@phazedrl
@phazedrl Жыл бұрын
Do you still need help with this? I figured out an easy way to do this
@Verwiesen
@Verwiesen Жыл бұрын
@@phazedrl yes i do
@ITEngines
@ITEngines Жыл бұрын
@@phazedrl help
@phazedrl
@phazedrl Жыл бұрын
@@Verwiesen I tried to send my discord but it’s getting automatically deleted
@phazedrl
@phazedrl Жыл бұрын
@@ITEngines trying to figure out how to send my contact information haha
@WoWPnK
@WoWPnK Жыл бұрын
Client.__init__() missing 1 required keyword-only argument: 'intents'
@TWJamesSS
@TWJamesSS Жыл бұрын
client = discord.Client(intents=discord.Intents.default()) run this instead of client = discord.client
@rarestars6238
@rarestars6238 Жыл бұрын
is it working in 2023?
@mooseify4997
@mooseify4997 Жыл бұрын
no
@keyanare
@keyanare Жыл бұрын
yes
@aaronrichardson3148
@aaronrichardson3148 3 ай бұрын
how you get it to work bc mine wont join the channel@@keyanare
@Channel-ut8ww
@Channel-ut8ww Жыл бұрын
TypeError: Client.__init__() missing 1 required keyword-only argument: 'intents'
@vaizi27
@vaizi27 Жыл бұрын
use py-cord lib and add this at the start of the code:intents = discord.Intents.default() intents.message_content = True client = discord.Client(intents=intents)
How to Make a Discord Bot with Python
29:17
pixegami
Рет қаралды 53 М.
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 15 МЛН
MEGA BOXES ARE BACK!!!
08:53
Brawl Stars
Рет қаралды 36 МЛН
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 33 МЛН
Create a Music Discord bot using Python
16:46
Computeshorts
Рет қаралды 112 М.
How to Make a Twitter Retweet Bot in Python using Tweepy
5:37
Create a Discord Music Bot [Python]
16:26
Ethan | The Code Syndicate
Рет қаралды 9 М.
Making a Discord Bot | Part 10: Cogs | Discord.py 2.0
5:26
How to Make a Discord Bot on Raspberry Pi? (Python easy method)
11:21
Don’t Bully a Vampire Girl 👿
0:38
Alan Chikin Chow
Рет қаралды 24 МЛН
Русалка
1:00
История одного вокалиста
Рет қаралды 4,7 МЛН
🚓КОПЫ явно такого НЕ ЖДАЛИ🫣#shorts
0:19
当小孩上学后,路飞太开心了#海贼王#路飞
0:25
路飞与唐舞桐
Рет қаралды 11 МЛН