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

18 lines
543 B
Python

import discord
from discord import app_commands
from discord.ext import commands
class ping(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.Cog.listener()
async def on_ready(self):
print("Ping Online")
@app_commands.command(name="ping", description="Pong!")
async def ping(self, interaction: discord.Interaction):
await interaction.response.send_message(f":ping_pong:**Pong!**\nLatency: {round(self.bot.latency * 1000)}ms")
async def setup(bot):
await bot.add_cog(ping(bot))