import issue
This commit is contained in:
1 parent
da02b7f73e
commit
867b7d4fc0
4 files changed
+10
-10
No files matched your search
+3
-3
@@ -201,10 +201,10 @@
|
|||||||
{
|
{
|
||||||
"label": "Music",
|
"label": "Music",
|
||||||
"kind": 6,
|
"kind": 6,
|
||||||
"importPath": "wavelink.music",
|
"importPath": "music.music",
|
||||||
"description": "wavelink.music",
|
"description": "music.music",
|
||||||
"peekOfCode": "class Music(commands.Cog):\n def __init__(self, bot):\n self.bot = bot\n @commands.Cog.listener()\n async def on_ready(self):\n node = wavelink.Node(uri='http://127.0.0.1:2333', password='yuukabot')\n await wavelink.Pool.connect(nodes=[node], client=self.bot)\n print('✅ Wavelink connected to Lavalink')\n @commands.command()\n async def play(self, ctx, *, query: str):",
|
"peekOfCode": "class Music(commands.Cog):\n def __init__(self, bot):\n self.bot = bot\n @commands.Cog.listener()\n async def on_ready(self):\n node = wavelink.Node(uri='http://127.0.0.1:2333', password='yuukabot')\n await wavelink.Pool.connect(nodes=[node], client=self.bot)\n print('✅ Wavelink connected to Lavalink')\n @commands.command()\n async def play(self, ctx, *, query: str):",
|
||||||
"detail": "wavelink.music",
|
"detail": "music.music",
|
||||||
"documentation": {}
|
"documentation": {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ async def main():
|
|||||||
await bot.load_extension('cogs.gifs')
|
await bot.load_extension('cogs.gifs')
|
||||||
await bot.load_extension('cogs.copypasta')
|
await bot.load_extension('cogs.copypasta')
|
||||||
await bot.load_extension('cogs.sysinfo')
|
await bot.load_extension('cogs.sysinfo')
|
||||||
await bot.load_extension('wavelink.music')
|
await bot.load_extension('music.music')
|
||||||
await bot.start(os.getenv('DISCORD_TOKEN'))
|
await bot.start(os.getenv('DISCORD_TOKEN'))
|
||||||
|
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
|||||||
File renamed without changes.
@@ -1,4 +1,4 @@
|
|||||||
import wavelink
|
import music
|
||||||
import discord
|
import discord
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
|
|
||||||
@@ -9,8 +9,8 @@ class Music(commands.Cog):
|
|||||||
|
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
async def on_ready(self):
|
async def on_ready(self):
|
||||||
node = wavelink.Node(uri='http://127.0.0.1:2333', password='yuukabot')
|
node = music.Node(uri='http://127.0.0.1:2333', password='yuukabot')
|
||||||
await wavelink.Pool.connect(nodes=[node], client=self.bot)
|
await music.Pool.connect(nodes=[node], client=self.bot)
|
||||||
print('✅ Wavelink connected to Lavalink')
|
print('✅ Wavelink connected to Lavalink')
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
@@ -19,11 +19,11 @@ class Music(commands.Cog):
|
|||||||
return await ctx.reply('you need to be in a voice channel!')
|
return await ctx.reply('you need to be in a voice channel!')
|
||||||
|
|
||||||
if not ctx.voice_client:
|
if not ctx.voice_client:
|
||||||
vc: wavelink.Player = await ctx.author.voice.channel.connect(cls=wavelink.Player)
|
vc: music.Player = await ctx.author.voice.channel.connect(cls=music.Player)
|
||||||
else:
|
else:
|
||||||
vc: wavelink.Player = ctx.voice_client
|
vc: music.Player = ctx.voice_client
|
||||||
|
|
||||||
tracks = await wavelink.Playable.search(query)
|
tracks = await music.Playable.search(query)
|
||||||
if not tracks:
|
if not tracks:
|
||||||
return await ctx.reply('nothing found!')
|
return await ctx.reply('nothing found!')
|
||||||
|
|
||||||
Reference in new issue
Block a user