commit
2fdac0b854
@ -1,6 +1,93 @@
|
|||||||
bot_secrets.json
|
bot_secrets.json
|
||||||
google_client_secret.json
|
google_client_secret.json
|
||||||
__pycache__/
|
|
||||||
logs/*
|
logs/*
|
||||||
*.sh.swp
|
*.sh.swp
|
||||||
.idea/
|
|
||||||
|
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
|
||||||
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
|
# User-specific stuff
|
||||||
|
.idea/**/workspace.xml
|
||||||
|
.idea/**/tasks.xml
|
||||||
|
.idea/**/dictionaries
|
||||||
|
.idea/**/shelf
|
||||||
|
|
||||||
|
# Sensitive or high-churn files
|
||||||
|
.idea/**/dataSources/
|
||||||
|
.idea/**/dataSources.ids
|
||||||
|
.idea/**/dataSources.local.xml
|
||||||
|
.idea/**/sqlDataSources.xml
|
||||||
|
.idea/**/dynamic.xml
|
||||||
|
.idea/**/uiDesigner.xml
|
||||||
|
.idea/**/dbnavigator.xml
|
||||||
|
|
||||||
|
# Gradle
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
.idea/**/libraries
|
||||||
|
|
||||||
|
# CMake
|
||||||
|
cmake-build-debug/
|
||||||
|
cmake-build-release/
|
||||||
|
|
||||||
|
# Mongo Explorer plugin
|
||||||
|
.idea/**/mongoSettings.xml
|
||||||
|
|
||||||
|
# File-based project format
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
out/
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Cursive Clojure plugin
|
||||||
|
.idea/replstate.xml
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
||||||
|
|
||||||
|
# Editor-based Rest Client
|
||||||
|
.idea/httpRequests
|
||||||
@ -1,44 +0,0 @@
|
|||||||
@checks.no_bots()
|
|
||||||
@commands.cooldown(1,5,commands.BucketType.user)
|
|
||||||
@commands.command()
|
|
||||||
async def captcha(self, ctx, type, *, text):
|
|
||||||
type = type.lower()
|
|
||||||
if type not in "checked unchecked loading".split():
|
|
||||||
raise commands.BadArgument(f"Invalid type {type!r}. Available "
|
|
||||||
"types: `unchecked`, `loading`, `checked`")
|
|
||||||
font = ImageFont.truetype("Roboto-Regular.ttf", 14)
|
|
||||||
async with ctx.typing():
|
|
||||||
img = Image.open(f"blank-captcha-{type}.png")
|
|
||||||
img.load()
|
|
||||||
d = ImageDraw.Draw(img)
|
|
||||||
fnc = functools.partial(d.text, (53,30), text, fill=(0,0,0,255),
|
|
||||||
font=font)
|
|
||||||
await self.bot.loop.run_in_executor(None, fnc)
|
|
||||||
img.save("captcha.png")
|
|
||||||
await ctx.send(file=discord.File("captcha.png"))
|
|
||||||
os.system("rm captcha.png")
|
|
||||||
img.close()
|
|
||||||
|
|
||||||
|
|
||||||
import functools, youtube_dl
|
|
||||||
#bot.voice_chan = await ctx.author.voice.channel.connect()
|
|
||||||
bot.voice_chan.stop()
|
|
||||||
opts = {"format": 'webm[abr>0]/bestaudio/best',"ignoreerrors": True,"default_search": "auto","source_address": "0.0.0.0",'quiet': True}
|
|
||||||
ydl = youtube_dl.YoutubeDL(opts)
|
|
||||||
url = 'https://www.youtube.com/watch?v=hjbPszSt5Pc'
|
|
||||||
func = functools.partial(ydl.extract_info, url, download=False)
|
|
||||||
info = func()
|
|
||||||
#bot.voice_chan.play(discord.FFmpegPCMAudio('dead_puppies.mp3'))
|
|
||||||
bot.voice_chan.play(discord.FFmpegPCMAudio(info['url']))
|
|
||||||
#async while bot.voice_chan.is_playing():
|
|
||||||
# pass
|
|
||||||
#await bot.voice_chan.disconnect()
|
|
||||||
|
|
||||||
# Run event in loop after number of seconds
|
|
||||||
from functools import partial
|
|
||||||
return bot.loop.call_later(120, partial(bot.loop.create_task, ctx.send(f"{ctx.author.mention} Timer's Up")))
|
|
||||||
|
|
||||||
# Get the number of tasks currently in the loop
|
|
||||||
import asyncio
|
|
||||||
return len(asyncio.Task.all_tasks())
|
|
||||||
|
|
||||||
Loading…
Reference in new issue