Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main.py #23

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Since a lot of discord music bots are being blocked by youtube nowadays I've dec
/resume - resumes playing the current song

# Running with docker
To run with docker simply run the command `docker run -e TOKEN=<your_token_here> -d pabolo02345/music_bot:latest`
To run with docker simply run the command `docker run -e TOKEN=<your_token_here> -d carlover101/music_bot:latest`


# Installation
Expand Down
10 changes: 7 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import discord
from discord.ext import commands
import os
# added to allow the cogs to be force-added later
import asyncio

#import all of the cogs
from help_cog import help_cog
Expand All @@ -12,8 +14,10 @@
bot.remove_command('help')

#register the class with the bot
bot.add_cog(help_cog(bot))
bot.add_cog(music_cog(bot))
async def setup(bot):
await bot.add_cog(help_cog(bot))
await bot.add_cog(music_cog(bot))

#start the bot with our token
bot.run(os.getenv("TOKEN"))
asyncio.run(setup(bot))
bot.run(os.getenv("TOKEN"))
2 changes: 1 addition & 1 deletion music_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import discord
from discord.ext import commands

from youtube_dl import YoutubeDL
from yt_dlp import YoutubeDL

class music_cog(commands.Cog):
def __init__(self, bot):
Expand Down
55 changes: 28 additions & 27 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
aiohttp==3.7.4.post0
astroid==2.5.1
async-timeout==3.0.1
attrs==21.4.0
cffi==1.14.5
chardet==4.0.0
colorama==0.4.4
cryptography==3.4.7
discord.py==1.7.3
ffmpeg==1.4
idna==3.3
isort==5.8.0
lazy-object-proxy==1.6.0
mccabe==0.6.1
multidict==6.0.2
pycparser==2.20
pylint==2.7.2
pymongo==3.12.1
PyNaCl==1.5.0
pyspnego==0.1.5
six==1.15.0
smbprotocol==1.5.0
toml==0.10.2
typing_extensions==4.1.1
wrapt==1.12.1
yarl==1.7.2
youtube-dl==2021.12.17
aiohttp
astroid
async-timeout
attrs
cffi
chardet
colorama
cryptography
discord.py
discord
ffmpeg
idna
isort
lazy-object-proxy
mccabe
multidict
pycparser
pylint
pymongo
PyNaCl
pyspnego
six
smbprotocol
toml
typing_extensions
wrapt
yarl
yt_dlp