from discord.ext import commands
from discord.commands import slash_command
from utilities.logs import Logging

Logging = Logging()
log = Logging.log

class Ping(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @slash_command(name="ping", description="Ping")
    async def ping(self, ctx):
        await ctx.respond(f"{round(self.bot.latency * 1000)}ms")
        log(f"[ping] コマンド実行")
        print(f"[ping] コマンド実行")


def setup(bot):
    bot.add_cog(Ping(bot))
