diff --git a/cogs/api.py b/cogs/api.py index 21e1157..b5ac941 100644 --- a/cogs/api.py +++ b/cogs/api.py @@ -184,7 +184,7 @@ def search_name(self, arg, compatlist): matchlist.append(game) return matchlist - @commands.command(aliases=["nbcompat", "ndscompat"], usage="[title id|game name]") + @commands.hybrid_command(aliases=["nbcompat", "ndscompat"], usage="[title id|game name]") @gspreadkey_exists() async def ndsbcompat(self, ctx, *, title: Optional[str]): """ @@ -275,7 +275,7 @@ async def update_netinfo(self): self.netinfo_embed = embed - @commands.command() + @commands.hybrid_command() async def netinfo(self, ctx): """Shows the Nintendo Network status information""" if await self.bot.is_owner(ctx.author): @@ -320,7 +320,7 @@ async def udb(self, ctx, *, application=None): menu = UDBMenu(source, ctx) await menu.start() - @commands.group(invoke_without_command=True, case_insensitive=True) + @commands.hybrid_group(invoke_without_command=True, case_insensitive=True) async def skins(self, ctx): """Displays an embed with a link to a database of TWiLight Menu++ skins and Unlaunch backgrounds\n To show a random skin: `skins [console] -r` @@ -512,7 +512,7 @@ async def gbatek(self, ctx, *, page): menu = GbatekMenu(links, ctx) await menu.start() - @commands.command(aliases=['mkey']) + @commands.hybrid_command(aliases=['mkey']) async def generatemkey(self, ctx, device: str, month: int, day: int, inquiry: str, deviceid: Optional[str] = None): """ Generate an mkey for given device. diff --git a/cogs/general.py b/cogs/general.py index dc649e1..7551c36 100644 --- a/cogs/general.py +++ b/cogs/general.py @@ -208,7 +208,7 @@ async def guide(self, ctx, guide: Literal("3ds", "wiiu", "vwii", "switch", "wii" embed.description = "The complete guide to modding your Nintendo DSi" await ctx.send(embed=embed) - @commands.group(invoke_without_command=True, case_insensitive=True) + @commands.hybrid_group(invoke_without_command=True, case_insensitive=True) async def install(self, ctx): """Links and/or information on installing apps""" await ctx.send_help(ctx.command) @@ -242,7 +242,7 @@ async def unlaunch_install(self, ctx): embed.description = "How to install Unlaunch on the DSi" await ctx.send(embed=embed) - @commands.group(invoke_without_command=True, case_insensitive=True) + @commands.hybrid_group(invoke_without_command=True, case_insensitive=True) async def uninstall(self, ctx): """Links and/or information on uninstalling apps""" await ctx.send_help(ctx.command) @@ -279,7 +279,7 @@ async def hiyacfw_uninstall(self, ctx): embed.description = "How to uninstall hiyaCFW on the DSi" await ctx.send(embed=embed) - @commands.command() + @commands.hybrid_command() async def twlfix(self, ctx): """Information on how to fix a broken TWL Partition""" await self.simple_embed(ctx, """ @@ -287,7 +287,7 @@ async def twlfix(self, ctx): These instructions require that you **perform a system update** after running the app. """, title="Fix broken TWL") - @commands.command() + @commands.hybrid_command() async def twlmanual(self, ctx): """How to access TWiLight Menu++ Instruction Manual""" embed = discord.Embed(title="How to access TWiLight Menu++ Instruction Manual") @@ -299,7 +299,7 @@ async def twlmanual(self, ctx): embed.add_field(name="Online", value=cleandoc("""The TWiLight Menu++ manual is also available online at https://manual.ds-homebrew.com."""), inline=False) await ctx.send(embed=embed) - @commands.command() + @commands.hybrid_command() async def twlsettings(self, ctx): """How to access TWiLight Menu++ Settings""" title = "How to access TWiLight Menu++ Settings" @@ -313,7 +313,7 @@ async def twlsettings(self, ctx): view = TWLMThemeMenu(ctx, title, initDescription, themeSteps) await view.start() - @commands.command() + @commands.hybrid_command() async def slot1launch(self, ctx): """How to launch the Slot-1 Game Card from TWiLight Menu++""" title = "How to launch the Slot-1 Game Card from TWiLight Menu++" @@ -327,7 +327,7 @@ async def slot1launch(self, ctx): view = TWLMThemeMenu(ctx, title, initDescription, themeSteps) await view.start() - @commands.command(aliases=["dsimenulaunch"]) + @commands.hybrid_command(aliases=["dsimenulaunch"]) async def homemenulaunch(self, ctx): """How to launch the DSi Menu / 3DS HOME Menu from TWiLight Menu++""" title = "How to launch the DSi Menu / 3DS HOME Menu from TWiLight Menu++" @@ -341,7 +341,7 @@ async def homemenulaunch(self, ctx): view = TWLMThemeMenu(ctx, title, initDescription, themeSteps) await view.start() - @commands.command(aliases=["sd-card-setup", "sdformat"]) + @commands.hybrid_command(aliases=["sd-card-setup", "sdformat"]) async def formatsd(self, ctx): """Displays an embed with a link that tells you how to properly format your SD card""" embed = discord.Embed(title="SD Card Setup") @@ -351,7 +351,7 @@ async def formatsd(self, ctx): embed.description = "How to properly format your SD card" await ctx.send(embed=embed) - @commands.command(aliases=["nanddump", "nandbackup"]) + @commands.hybrid_command(aliases=["nanddump", "nandbackup"]) async def nand(self, ctx): """Links to the NAND dumping guide""" embed = discord.Embed(title="Dumping NAND") @@ -361,7 +361,7 @@ async def nand(self, ctx): embed.description = "How to dump your DSi's NAND" await ctx.send(embed=embed) - @commands.command() + @commands.hybrid_command() async def vc(self, ctx): """Links to the 3DS Virtual Console Inject guide""" embed = discord.Embed(title="Virtual Console Injects for 3DS") @@ -371,7 +371,7 @@ async def vc(self, ctx): embed.description = "The recommended way to play old classics on your 3DS" await ctx.send(embed=embed) - @commands.command() + @commands.hybrid_command() async def dump(self, ctx): """How to dump games and data for CFW consoles""" await self.simple_embed(ctx, text=""" @@ -380,7 +380,7 @@ async def dump(self, ctx): [Dumping DSiWare](https://dsi.cfw.guide/dsiware-backups.html) """, title="Dumping Games to ROM files") - @commands.group(invoke_without_command=True, case_insensitive=True) + @commands.hybrid_group(invoke_without_command=True, case_insensitive=True) async def nightly(self, ctx): """Instructions on installing nightly builds""" await ctx.send_help(ctx.command) @@ -399,7 +399,7 @@ async def ndsbootstrap_nightly(self, ctx): On the 3DS, this can be installed from Universal Updater. Select nds-bootstrap, then install the [nightly] build." await self.simple_embed(ctx, description, title="nds-bootstrap nightly") - @commands.command(aliases=["crowdin"]) + @commands.hybrid_command(aliases=["crowdin"]) async def translate(self, ctx): """Links to Crowdin projects""" crowdin_baseurl = "https://crowdin.com/project" @@ -414,7 +414,7 @@ async def translate(self, ctx): view.add_item(discord.ui.Button(label="DSi Guide", url=f"{crowdin_baseurl}/dsi-guide")) await ctx.send(embed=embed, view=view) - @commands.command(aliases=["colour"]) + @commands.hybrid_command(aliases=["colour"]) async def color(self, ctx, *, color): """Displays conversions of a color from #RRGGBB, #RGB, RRR GGG BBB, and BGR15""" @@ -445,14 +445,14 @@ async def color(self, ctx, *, color): embed.add_field(name="BGR15", value=f"`0x{bgr15:04X}` `0x{bgr15 | 1 << 15:04X}`") await ctx.send(embed=embed) - @commands.command() + @commands.hybrid_command() async def sdroot(self, ctx): """Displays an image that shows what a root is""" embed = discord.Embed() embed.set_image(url="https://media.discordapp.net/attachments/489307733074640926/756947922804932739/wherestheroot.png") await ctx.send(embed=embed) - @commands.command() + @commands.hybrid_command() async def sdlock(self, ctx): """Tells you how to disable write protection on an SD Card""" embed = discord.Embed(title="Disable write protection on an SD Card") @@ -464,7 +464,7 @@ async def sdlock(self, ctx): embed.set_image(url="https://i.imgur.com/RvKjWcz.png") await ctx.send(embed=embed) - @commands.group(aliases=["flashcard", "flashcards", "flashcarts"], invoke_without_command=True, case_insensitive=True) + @commands.hybrid_group(aliases=["flashcard", "flashcards", "flashcarts"], invoke_without_command=True, case_insensitive=True) async def flashcart(self, ctx): """Links the r/flashcarts quick start guide for a given console""" await ctx.send_help(ctx.command) @@ -489,7 +489,7 @@ async def gba(self, ctx): embed.set_thumbnail(url="https://b.thumbs.redditmedia.com/lBsOPXDyCx0p1MSx1qCdAtglHB4nineg5w9-3KHzO2A.png") await ctx.send(embed=embed) - @commands.command(aliases=["twlboot"]) + @commands.hybrid_command(aliases=["twlboot"]) async def dsiboot(self, ctx): """Tells you how to automatically boot TWiLight Menu++ with Unlaunch""" embed = discord.Embed(title="How to launch TWiLight Menu++ automatically with Unlaunch") @@ -501,7 +501,7 @@ async def dsiboot(self, ctx): """) await ctx.send(embed=embed) - @commands.command(name="7-zip", aliases=["7zip", "7z"]) + @commands.hybrid_command(name="7-zip", aliases=["7zip", "7z"]) async def sevenzip(self, ctx): """Links to the 7-Zip website""" embed = discord.Embed(title="7-Zip") @@ -509,7 +509,7 @@ async def sevenzip(self, ctx): embed.description = "7-Zip is the recommended program for Windows users to use to extract .7z files, such as the one TWiLight Menu++ comes in.\nMost people should download the '64-bit x64' version." await ctx.send(embed=embed) - @commands.command() + @commands.hybrid_command() async def ysmenu(self, ctx): """Links to RetroGameFan's YSMenu download page""" embed = discord.Embed(title="RetroGameFan's YSMenu") @@ -519,17 +519,17 @@ async def ysmenu(self, ctx): embed.set_thumbnail(url="https://gbatemp.net/data/avatars/l/221/221134.jpg?1570890734") await ctx.send(embed=embed) - @commands.command() + @commands.hybrid_command() async def lazydsi(self, ctx): """Tells you to stop trying to use it (and/or the vguide)""" embed = discord.Embed(title="Lazy DSi Downloader is deprecated") embed.description = "This application is deprecated. Please read the [guide](https://dsi.cfw.guide)." await ctx.send(embed=embed) - @commands.command() - async def cardflagcheck(self, ctx, inputFlags: str): + @commands.hybrid_command() + async def cardflagcheck(self, ctx, flags: str): try: - card = NDSCardFlagCheck(int(inputFlags, 16)) + card = NDSCardFlagCheck(int(flags, 16)) except ValueError: return await ctx.send("Input is not a valid hex number. Please try again.") await ctx.send(f"0x{card.inputFlags:08X} = {card.calculate()}") diff --git a/cogs/meta.py b/cogs/meta.py index 4ea37f6..2bf790e 100644 --- a/cogs/meta.py +++ b/cogs/meta.py @@ -18,7 +18,7 @@ class Meta(commands.Cog): def __init__(self, bot): self.bot = bot - @commands.command(aliases=["botinfo", "whoisthisbot"]) + @commands.hybrid_command(aliases=["botinfo", "whoisthisbot"]) async def about(self, ctx): """About TWLHelper""" embed = discord.Embed(title="About TWLHelper") diff --git a/cogs/nointro.py b/cogs/nointro.py index 9538a21..25d8af2 100644 --- a/cogs/nointro.py +++ b/cogs/nointro.py @@ -46,7 +46,7 @@ async def cog_check(self, ctx): raise commands.CheckFailure() return True - @commands.command(usage="