diff --git a/commands/basic.py b/commands/basic.py new file mode 100644 index 0000000..df0a80f --- /dev/null +++ b/commands/basic.py @@ -0,0 +1,21 @@ +import nextcord +from nextcord.ext import commands + +class Main(): + def __init__(self, bot): + self.client = bot + + @commands.command() + async def help(self, ctx: nextcord.Message): + embed = nextcord.Embed(title="Help") + for command in self.client.commands: + embed.add_field(name=command.name, value=f"Arguments: {command.usage} \nDescription: {command.description}") + await ctx.reply(embed=embed) + + @commands.command(description="Check how fast the bot will reply to you.") + async def ping(ctx: nextcord.Message): + await ctx.reply("Pong!") + + +def setup(bot): + Main(bot) \ No newline at end of file diff --git a/commands/voice.py b/commands/voice.py index daa3192..708f7a2 100644 --- a/commands/voice.py +++ b/commands/voice.py @@ -12,7 +12,7 @@ SquogVideo = { 'key': 'FFmpegExtractAudio', 'preferredcodec': 'mp3', }], - "outtmpl": './%(uploader)s_%(title)s.%(ext)s', + "outtmpl": './music/%(uploader)s_%(title)s.%(ext)s', "quality": "low" } @@ -65,7 +65,7 @@ class Main(commands.Cog): print(SquogExt) SquogLength = SquogFinalName.find(SquogExt[1]) + 1 print(SquogLength) - SquogEvilFilename = f"{SquogFinalName[:SquogLength]}mp3" + SquogEvilFilename = f"music/{SquogFinalName[:SquogLength]}mp3" SquogVoiceClient.play(nextcord.FFmpegPCMAudio(f"{SquogEvilFilename}")) @commands.command(description="Stops the music in voice channel") diff --git a/main.py b/main.py index edbd404..1a39fe8 100644 --- a/main.py +++ b/main.py @@ -10,25 +10,6 @@ client.remove_command("help") SquogMod = None -# _____ _ -# / ____| | | -# | | ___ _ __ ___ _ __ ___ __ _ _ __ __| |___ -# | | / _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` / __| -# | |___| (_) | | | | | | | | | | | (_| | | | | (_| \__ \ -# \_____\___/|_| |_| |_|_| |_| |_|\__,_|_| |_|\__,_|___/ - -@client.command() -async def help(ctx: nextcord.Message): - embed = nextcord.Embed(title="Help") - print(client.commands) - for command in client.commands: - embed.add_field(name=command.name, value=f"Arguments: {command.usage} \nDescription: {command.description}") - await ctx.reply(embed=embed) - -@client.command(description="Check how fast the bot will reply to you.", help="evil") -async def ping(ctx: nextcord.Message): - await ctx.reply("Pong!") - for filename in os.listdir('./commands'): if filename.endswith('.py'): client.load_extension(f'commands.{filename[:-3]}')