import discord
from discord.ext import commands
class Music(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.Cog.listener()
async def on_ready(self):
print("music.py is ready!")
@commands.command(aliases=["j"])
async def join(self, ctx):
if not ctx.author.voice:
await ctx.send("...")
else:
channel = ctx.author.voice.channel
await channel.connect()
async def setup(bot):
await bot.add_cog(Music(bot))
I'm not sure where the problem is.
Okay, I had problem with python modules and enviorment variables. Now It's working. Thanks anyway.