mirror of
https://gitlab.com/pancakes1234/wdiscordbotserver.git
synced 2025-06-16 07:14:21 -06:00
feat: Update download commands to use app_commands for improved organization
This commit is contained in:
parent
172b66a776
commit
2474f22f76
@ -6,10 +6,8 @@ class Download(commands.Cog):
|
|||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
|
|
||||||
download = app_commands.Group(name="download", description="Download useful files")
|
@app_commands.command(name="download_open_otp", description="Get the OpenOTP installer link")
|
||||||
|
async def download_open_otp(self, interaction: discord.Interaction):
|
||||||
@download.command(name="open_otp", description="Get the OpenOTP installer link")
|
|
||||||
async def open_otp(self, interaction: discord.Interaction):
|
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
title="Download OpenOTP Installer",
|
title="Download OpenOTP Installer",
|
||||||
description="[Click here to download OpenOTPInstaller.exe](https://filehost.internettools.org/OpenOTPInstaller.exe)",
|
description="[Click here to download OpenOTPInstaller.exe](https://filehost.internettools.org/OpenOTPInstaller.exe)",
|
||||||
@ -17,8 +15,8 @@ class Download(commands.Cog):
|
|||||||
)
|
)
|
||||||
await interaction.response.send_message(embed=embed)
|
await interaction.response.send_message(embed=embed)
|
||||||
|
|
||||||
@download.command(name="archlinux", description="Get the Arch Linux ISO link")
|
@app_commands.command(name="download_archlinux", description="Get the Arch Linux ISO link")
|
||||||
async def archlinux(self, interaction: discord.Interaction):
|
async def download_archlinux(self, interaction: discord.Interaction):
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
title="Download Arch Linux ISO",
|
title="Download Arch Linux ISO",
|
||||||
description="[Click here to download Arch Linux 2025.05.01 ISO](https://ftpmirror.infania.net/mirror/archlinux/iso/2025.05.01/)",
|
description="[Click here to download Arch Linux 2025.05.01 ISO](https://ftpmirror.infania.net/mirror/archlinux/iso/2025.05.01/)",
|
||||||
@ -26,8 +24,8 @@ class Download(commands.Cog):
|
|||||||
)
|
)
|
||||||
await interaction.response.send_message(embed=embed)
|
await interaction.response.send_message(embed=embed)
|
||||||
|
|
||||||
@download.command(name="ubuntu", description="Get the Ubuntu mirror link")
|
@app_commands.command(name="download_ubuntu", description="Get the Ubuntu mirror link")
|
||||||
async def ubuntu(self, interaction: discord.Interaction):
|
async def download_ubuntu(self, interaction: discord.Interaction):
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
title="Download Ubuntu (Mirror)",
|
title="Download Ubuntu (Mirror)",
|
||||||
description="[Click here for the Ubuntu mirror](https://launchpad.net/ubuntu/+mirror/ftp.yz.yamagata-u.ac.jp-release)",
|
description="[Click here for the Ubuntu mirror](https://launchpad.net/ubuntu/+mirror/ftp.yz.yamagata-u.ac.jp-release)",
|
||||||
@ -35,8 +33,8 @@ class Download(commands.Cog):
|
|||||||
)
|
)
|
||||||
await interaction.response.send_message(embed=embed)
|
await interaction.response.send_message(embed=embed)
|
||||||
|
|
||||||
@download.command(name="vscode_windows", description="Get the Visual Studio Code installer for Windows (ARM64)")
|
@app_commands.command(name="download_vscode_windows", description="Get the Visual Studio Code installer for Windows (ARM64)")
|
||||||
async def vscode_windows(self, interaction: discord.Interaction):
|
async def download_vscode_windows(self, interaction: discord.Interaction):
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
title="Download Visual Studio Code for Windows (ARM64)",
|
title="Download Visual Studio Code for Windows (ARM64)",
|
||||||
description="[Click here to download VS Code for Windows (ARM64)](https://code.visualstudio.com/sha/download?build=stable&os=win32-arm64-user)",
|
description="[Click here to download VS Code for Windows (ARM64)](https://code.visualstudio.com/sha/download?build=stable&os=win32-arm64-user)",
|
||||||
@ -44,8 +42,8 @@ class Download(commands.Cog):
|
|||||||
)
|
)
|
||||||
await interaction.response.send_message(embed=embed)
|
await interaction.response.send_message(embed=embed)
|
||||||
|
|
||||||
@download.command(name="vscode_mac", description="Get the Visual Studio Code installer for Mac (Universal)")
|
@app_commands.command(name="download_vscode_mac", description="Get the Visual Studio Code installer for Mac (Universal)")
|
||||||
async def vscode_mac(self, interaction: discord.Interaction):
|
async def download_vscode_mac(self, interaction: discord.Interaction):
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
title="Download Visual Studio Code for Mac (Universal)",
|
title="Download Visual Studio Code for Mac (Universal)",
|
||||||
description="[Click here to download VS Code for Mac (Universal)](https://code.visualstudio.com/sha/download?build=stable&os=darwin-universal)",
|
description="[Click here to download VS Code for Mac (Universal)](https://code.visualstudio.com/sha/download?build=stable&os=darwin-universal)",
|
||||||
@ -53,8 +51,5 @@ class Download(commands.Cog):
|
|||||||
)
|
)
|
||||||
await interaction.response.send_message(embed=embed)
|
await interaction.response.send_message(embed=embed)
|
||||||
|
|
||||||
async def cog_load(self):
|
|
||||||
self.bot.tree.add_command(self.download)
|
|
||||||
|
|
||||||
async def setup(bot):
|
async def setup(bot):
|
||||||
await bot.add_cog(Download(bot))
|
await bot.add_cog(Download(bot))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user