2025-09-14 18:54:56 -04:00
|
|
|
import platform
|
|
|
|
|
import discord
|
|
|
|
|
from discord.ext import commands
|
|
|
|
|
from discord.ext.commands import Context
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class BotInfo(commands.Cog, name="botinfo"):
|
|
|
|
|
def __init__(self, bot) -> None:
|
|
|
|
|
self.bot = bot
|
|
|
|
|
|
|
|
|
|
@commands.hybrid_command(
|
|
|
|
|
name="botinfo",
|
|
|
|
|
description="Get some useful (or not) information about the bot.",
|
|
|
|
|
)
|
|
|
|
|
async def botinfo(self, context: Context) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Get some useful (or not) information about the bot.
|
|
|
|
|
|
|
|
|
|
:param context: The hybrid command context.
|
|
|
|
|
"""
|
|
|
|
|
embed = discord.Embed(
|
2025-09-15 08:44:54 -04:00
|
|
|
title="Nyrix Discord Bot",
|
|
|
|
|
color=0x7289DA,
|
2025-09-14 18:54:56 -04:00
|
|
|
)
|
2025-09-15 08:44:54 -04:00
|
|
|
embed.set_author(name="Bot Information", icon_url="https://yes.nighty.works/raw/y5SEZ9.webp")
|
|
|
|
|
embed.add_field(name="Owner:", value="[neoarz](https://discordapp.com/users/1015372540937502851)", inline=True)
|
2025-09-14 18:54:56 -04:00
|
|
|
embed.add_field(
|
|
|
|
|
name="Python Version:", value=f"{platform.python_version()}", inline=True
|
|
|
|
|
)
|
|
|
|
|
embed.add_field(
|
|
|
|
|
name="Prefix:",
|
|
|
|
|
value=f"/ (Slash Commands) or {self.bot.bot_prefix} for normal commands",
|
|
|
|
|
inline=False,
|
|
|
|
|
)
|
2025-09-15 13:50:24 -04:00
|
|
|
if getattr(context, "interaction", None):
|
2025-09-15 09:00:02 -04:00
|
|
|
await context.interaction.response.send_message(embed=embed, ephemeral=True)
|
|
|
|
|
else:
|
|
|
|
|
await context.send(embed=embed)
|
2025-09-14 18:54:56 -04:00
|
|
|
|
|
|
|
|
async def setup(bot) -> None:
|
2025-09-15 08:44:54 -04:00
|
|
|
await bot.add_cog(BotInfo(bot))
|