v0.0.6\nplay_audio fixes
This commit is contained in:
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
3
bot.py
3
bot.py
@@ -1,10 +1,9 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import asyncio
|
import asyncio
|
||||||
import os
|
import os
|
||||||
from typing import List
|
|
||||||
|
|
||||||
import disnake
|
import disnake
|
||||||
from disnake import OptionChoice, OptionType, Option
|
from disnake import OptionType, Option
|
||||||
from disnake.ext import commands
|
from disnake.ext import commands
|
||||||
from __init__ import version_info as ver
|
from __init__ import version_info as ver
|
||||||
from lib import work_with_cogs, cog_list
|
from lib import work_with_cogs, cog_list
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from lib import logger
|
|||||||
|
|
||||||
|
|
||||||
class Admin(commands.Cog, name='Admin'):
|
class Admin(commands.Cog, name='Admin'):
|
||||||
def __init__(self, bot):
|
def __init__(self, bot: commands.Bot):
|
||||||
self.bot = bot # a defining bot as global var in class
|
self.bot = bot # a defining bot as global var in class
|
||||||
|
|
||||||
@commands.Cog.listener() # this is a decorator for events/listeners
|
@commands.Cog.listener() # this is a decorator for events/listeners
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import random
|
import random
|
||||||
from itertools import islice
|
|
||||||
from typing import List
|
|
||||||
|
|
||||||
import disnake
|
import disnake
|
||||||
from disnake import OptionChoice, Option, OptionType
|
from disnake import OptionChoice, Option, OptionType
|
||||||
@@ -13,7 +11,7 @@ from lib import play_audio
|
|||||||
|
|
||||||
# todo: write chose audio from list by slash command
|
# todo: write chose audio from list by slash command
|
||||||
class Audio(commands.Cog, name='Audio'):
|
class Audio(commands.Cog, name='Audio'):
|
||||||
def __init__(self, bot):
|
def __init__(self, bot: commands.Bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
|
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ from lib import logger
|
|||||||
|
|
||||||
|
|
||||||
class Fun(commands.Cog, name='Fun'):
|
class Fun(commands.Cog, name='Fun'):
|
||||||
def __init__(self, bot):
|
def __init__(self, bot: commands.Bot):
|
||||||
self.bot = bot # defining bot as global var in class
|
self.bot = bot # defining bot as global var in class
|
||||||
|
|
||||||
@commands.Cog.listener() # this is a decorator for events/listeners
|
@commands.Cog.listener() # this is a decorator for events/listeners
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from lib import logger
|
|||||||
|
|
||||||
|
|
||||||
class Testing(commands.Cog, name='Testing'):
|
class Testing(commands.Cog, name='Testing'):
|
||||||
def __init__(self, bot):
|
def __init__(self, bot: commands.Bot):
|
||||||
self.bot = bot # defining bot as global var in class
|
self.bot = bot # defining bot as global var in class
|
||||||
|
|
||||||
@commands.Cog.listener() # this is a decorator for events/listeners
|
@commands.Cog.listener() # this is a decorator for events/listeners
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from lib import logger
|
|||||||
|
|
||||||
|
|
||||||
class General(commands.Cog):
|
class General(commands.Cog):
|
||||||
def __init__(self, bot):
|
def __init__(self, bot: commands.Bot):
|
||||||
self.bot = bot # defining bot as global var in class
|
self.bot = bot # defining bot as global var in class
|
||||||
|
|
||||||
@commands.Cog.listener() # this is a decorator for events/listeners
|
@commands.Cog.listener() # this is a decorator for events/listeners
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from lib import logger
|
|||||||
|
|
||||||
|
|
||||||
class BotInfo(commands.Cog, name='Bot Info'):
|
class BotInfo(commands.Cog, name='Bot Info'):
|
||||||
def __init__(self, bot):
|
def __init__(self, bot: commands.Bot):
|
||||||
self.bot = bot # defining bot as global var in class
|
self.bot = bot # defining bot as global var in class
|
||||||
|
|
||||||
@commands.Cog.listener() # this is a decorator for events/listeners
|
@commands.Cog.listener() # this is a decorator for events/listeners
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from .Logger import logger
|
from .Logger import logger
|
||||||
from asyncio import sleep
|
from asyncio import sleep
|
||||||
from disnake import FFmpegOpusAudio, opus
|
from disnake import FFmpegOpusAudio
|
||||||
|
|
||||||
|
|
||||||
async def play_audio(audio, bot, vc):
|
async def play_audio(audio, bot, vc):
|
||||||
|
|||||||
Reference in New Issue
Block a user