Rotation and hashing V1.0.1
This commit is contained in:
+8
-3
@@ -7,12 +7,17 @@ class Simp(commands.Cog):
|
||||
def __init__(self, bot: discord.Bot):
|
||||
self.bot = bot
|
||||
|
||||
@discord.slash_command(description="Nie, nie jestem pantoflem")
|
||||
@discord.slash_command(description='Nie, nie jestem pantoflem')
|
||||
async def pantofel(self, ctx: discord.ApplicationContext, url: str):
|
||||
await ctx.defer()
|
||||
|
||||
filename = helpers.download_video(url)
|
||||
await ctx.respond(file=discord.File(filename))
|
||||
result = helpers.download_video(url)
|
||||
|
||||
if result['status'] == 'error':
|
||||
await ctx.respond(f'Błąd pobierania: {result['message']}')
|
||||
return
|
||||
|
||||
await ctx.respond(file=discord.File(result['filename']))
|
||||
|
||||
|
||||
def setup(bot: discord.Bot):
|
||||
|
||||
Reference in New Issue
Block a user