Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
import discord
import youtube_dl
import asyncio
from discord.ext import commands
client = commands.Bot(command_prefix = '.')
players = {'https://www.youtube.com/'}
TOKEN = 'NTA3NjMyNDUwMzkwODUxNTg1.Drzsew.lVbUm7WKIPrV56q_9LegdqZuXZo'
"""Code From The online disclord.py documentation"""
@client.event
async def on_ready():
await client.change_presence(game=discord.Game(name = 'Fortnite like a Boss'))
print ("BOT ONLINE")
""""""
"""Code From The online disclord.py documentation"""
@client.command(pass_context = True)
async def join(ctx):
channel = ctx.message.author.voice.voice_channel
await client.join_voice_channel(channel)
""""""
"""Code From The online disclord.py documentation"""
@client.command(pass_context = True)
async def leave(ctx):
server = ctx.message.server
voice_channel = client.vocemessage_in(server)
await voice_channel.disconnect()
""""""
"""Code by Lucas Kumara"""
@client.command(pass_context = True)
async def play(ctx, url):
server = ctx.message.server
client = client.voice_client_in(server)
player = await voice_client.create_ytdl_player(url)
players [server.id] = player
player.start()
""""""
client.run(TOKEN)