Create a Music Discord bot using Python

Computeshorts · 126K views · 2022 · 16:46

Open on YouTube

Python, Ruby & scripting languagesSoftware (other)tutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the tutorial they followed, usually when their resulting discord.py bot fails to recognise commands or cogs.

Recommended by 1 people across 1 different months, 2022 to 2024.

What it is

A 16-minute tutorial by Computeshorts that builds a Discord music bot in Python using discord.py, ffmpeg and youtube_dl. It walks from dependency setup and the Discord developer console through search, play, pause and queue commands, including a debugging session.

What people said

Recommends Demirladon · 2023-03 · Stack Overflow · on “Why is my python discord bot not recognising my commands”

I tried making a discord bot using a youtube tutorial ( [this video] ) however my discord music bot is not recignising any of my commands. It launches with no errors but it doesn't do anything it's supposed to be doing. I am a beginner in python and not sure what I should be doing at this point. Anyone encountered this error before or knows how to fix it? This is a github page for the code used (mine is a slightly modified version of this to fix some errors) [LINK] Every time I try running main.py I get these messages: 2023-02-28 21:42:18 INFO discord.client logging in using static token INFO:discord.client:logging in using static token 2023-02-28 21:42:19 INFO discord.gateway Shard ID None has c

Cites Tobee · 2022-12 · Stack Overflow · on “Discord bot can't read commands”

I've been following this tutorial [this video] on how to create a discord bot, and it dosn't recognize my commands. This is my main code: import discord from discord.ext import commands import os from help_cog import help_cog from music_cog import music_cog # Command prefix intents = discord.Intents.all() bot = commands.Bot(command_prefix="!",intents=intents) @bot.event async def on_ready(): print("Bot is up and ready!") bot.remove_command("help") bot.add_cog(help_cog(bot)) bot.add_cog(music_cog(bot)) # Run the client with open('token.txt', 'r') as file: token = file.readlines()[0] bot.run(token) Here is my music_cog: import discord from discord.ext import commands from youtube_dl import YoutubeD

Cites Nguyễn Trung Kiên · 2024-02 · Stack Overflow · on “Stuck at making discord Bot”

I wanted to make a discord bot so I got up to youtube and watched this video: [this video] when I try /help , it gives out: discord.ext.commands.bot: Ignoring exception in command None discord.ext.commands.errors.CommandNotFound: Command "help" is not found This is my main.py import discord from discord.ext import commands import os from music_cog import MusicCog from help_cog import HelpCog intents = discord.Intents.all() bot = commands.Bot(command_prefix="/", intents=intents) bot.remove_command('help') async def setup(bot): await bot.add_cog(HelpCog(bot)) async def set(bot): await bot.add_cog(MusicCog(bot)) os.environ['TOKEN'] = '' bot.run(os.getenv('TOKEN')) help_cog.py: from discord.ext impor