blob/commands/number.py
2025-01-25 16:31:29 -05:00

20 lines
596 B
Python

import discord
import random
from discord.ext import commands
from discord import app_commands
class Number(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.Cog.listener()
async def on_ready(self):
print("Number Online")
@app_commands.command(name="number", description="Get a random number between from what you choose")
async def number(self, interaction: discord.Interaction, num1: int, num2: int):
await interaction.response.send_message(f"{random.randint(num1, num2)}")
async def setup(bot):
await bot.add_cog(Number(bot))