More Cogs
This commit is contained in:
parent
3accb31e42
commit
d8771ca7ba
21
commands/basic.py
Normal file
21
commands/basic.py
Normal file
@ -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)
|
@ -12,7 +12,7 @@ SquogVideo = {
|
|||||||
'key': 'FFmpegExtractAudio',
|
'key': 'FFmpegExtractAudio',
|
||||||
'preferredcodec': 'mp3',
|
'preferredcodec': 'mp3',
|
||||||
}],
|
}],
|
||||||
"outtmpl": './%(uploader)s_%(title)s.%(ext)s',
|
"outtmpl": './music/%(uploader)s_%(title)s.%(ext)s',
|
||||||
"quality": "low"
|
"quality": "low"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ class Main(commands.Cog):
|
|||||||
print(SquogExt)
|
print(SquogExt)
|
||||||
SquogLength = SquogFinalName.find(SquogExt[1]) + 1
|
SquogLength = SquogFinalName.find(SquogExt[1]) + 1
|
||||||
print(SquogLength)
|
print(SquogLength)
|
||||||
SquogEvilFilename = f"{SquogFinalName[:SquogLength]}mp3"
|
SquogEvilFilename = f"music/{SquogFinalName[:SquogLength]}mp3"
|
||||||
SquogVoiceClient.play(nextcord.FFmpegPCMAudio(f"{SquogEvilFilename}"))
|
SquogVoiceClient.play(nextcord.FFmpegPCMAudio(f"{SquogEvilFilename}"))
|
||||||
|
|
||||||
@commands.command(description="Stops the music in voice channel")
|
@commands.command(description="Stops the music in voice channel")
|
||||||
|
19
main.py
19
main.py
@ -10,25 +10,6 @@ client.remove_command("help")
|
|||||||
|
|
||||||
SquogMod = None
|
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'):
|
for filename in os.listdir('./commands'):
|
||||||
if filename.endswith('.py'):
|
if filename.endswith('.py'):
|
||||||
client.load_extension(f'commands.{filename[:-3]}')
|
client.load_extension(f'commands.{filename[:-3]}')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user