Files
Mace-AIO-Discord-Bot---With…/bot/cogs/commands/nitro.py

54 lines
2.3 KiB
Python

# ╔══════════════════════════════════════════════════════════════════╗
# ║ ║
# ║ +-+-+-+-+-+-+-+-+ ║
# ║ |H|e|x|a|H|o|s|t| ║
# ║ +-+-+-+-+-+-+-+-+ ║
# ║ ║
# ║ © 2026 HexaHost — All Rights Reserved ║
# ║ ║
# ║ discord ── https://discord.gg/hexahost ║
# ║ github ── https://github.com/theoneandonlymace ║
# ║ ║
# ╚══════════════════════════════════════════════════════════════════╝
import discord
from discord.ext import commands
from discord.ui import Button, View
class Nitro(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.Cog.listener()
async def on_message(self, message):
if self.bot.user in message.mentions and (
"nitro" in message.content.lower() or "$nitro" in message.content.lower()
):
ctx = await self.bot.get_context(message)
await self.bot.invoke(ctx)
@commands.hybrid_command(name="nitro")
async def nitro(self, ctx):
embed = discord.Embed(color=0x2B2D31)
embed.add_field(
name="A WILD NITRO GIFT APPEARS?",
value="Expires in 12 hours\n\nClick the claim button for claiming Nitro",
inline=False,
)
embed.set_image(
url="https://media.tenor.com/ltVe8iMhgXcAAAAS/nitro-discord.gif"
)
claim_button = Button(
style=discord.ButtonStyle.primary,
label="Click me!",
url="https://discord.gg/hexahost",
disabled=False,
)
view = View()
view.add_item(claim_button)
await ctx.send(embed=embed, view=view)