Skip to content

Instantly share code, notes, and snippets.

View TheBigL's full-sized avatar

LM TheBigL

View GitHub Profile
@TheBigL
TheBigL / YTDLSource.py
Last active July 5, 2022 16:40
main.py Code 2022/5/6
import asyncio
import discord
import youtube_dl
from discord.ext import commands
youtube_dl.utils.bug_reports_message = lambda: ''
ffmpeg_options = {'before_options': '-reconnect 1 -reconnect_streamed 1 '
'-reconnect_delay_max 5', 'options': '-vn'}
ydl_options = {'format': 'best-audio'}
@TheBigL
TheBigL / main.py
Created May 6, 2022 05:33
Problems loading the cog Part 1
import discord
from discord import client
from discord.ext import commands
import os
from dotenv import load_dotenv
from cog import music
bot = commands.Bot(command_prefix='.', description="L's very own Jukebot", intents=discord.Intents.all())
class YTDLSource(discord.PCMVolumeTransformer):
def __init__(self, source, *, data, volume=0.5):
super().__init__(source, volume)
self.data = data
self.title = data.get('title')
self.url = data.url('url')
@classmethod
if(url == None):
ctx.send("You need to enter a URL before playing!")
else:
ffmpeg_options = {'before_options': '-reconnect 1 -reconnect_streamed 1 '
'-reconnect_delay_max 5', 'options': '-vn'}
ydl_options = {'format': 'bestaudio'}
vc = ctx.voice_client
### Keybase proof
I hereby claim:
* I am thebigl on github.
* I am lmorrison (https://keybase.io/lmorrison) on keybase.
* I have a public key ASDozAhyfx2kNWnxBLgbZJ_PfFHGS6csMW-7q2TYF_UnJQo
To claim this, I am signing this object: