From 0b7edb36f531390f87da5b9451d5e7ddaf6a5ef0 Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Mon, 8 Jun 2026 03:20:37 -0700 Subject: [PATCH] Migrate .bot to an app command --- modules/administration/botinfo.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/administration/botinfo.py b/modules/administration/botinfo.py index 0e485b6a..e92a228b 100644 --- a/modules/administration/botinfo.py +++ b/modules/administration/botinfo.py @@ -14,7 +14,7 @@ import discord import git -from discord.ext import commands +from discord import app_commands from core import auxiliary, cogs @@ -36,15 +36,18 @@ class BotInfo(cogs.BaseCog): The class that holds the bot command """ - @commands.check(auxiliary.bot_admin_check_context) - @commands.command(name="bot", description="Provides bot info") - async def get_bot_data(self: Self, ctx: commands.Context) -> None: + @app_commands.check(auxiliary.bot_admin_check_interaction) + @app_commands.command( + name="bot", + description="Provides bot info", + ) + async def get_bot_data(self: Self, interaction: discord.Interaction) -> None: """Gets various data about the bot. This is a command and should be accessed via Discord. Args: - ctx (commands.Context): the context object for the calling message + interaction (discord.Interaction): the interaction that called this command """ embed = discord.Embed(title=self.bot.user.name, color=discord.Color.blurple()) @@ -122,4 +125,4 @@ async def get_bot_data(self: Self, ctx: commands.Context) -> None: embed.set_thumbnail(url=self.bot.user.display_avatar.url) - await ctx.send(embed=embed) + await interaction.response.send_message(embed=embed)