2023-07-27 09:59:38 +00:00
|
|
|
import logging
|
|
|
|
|
|
|
|
from discord.ext import commands
|
|
|
|
|
|
|
|
from main import strings
|
2024-02-28 13:07:16 +00:00
|
|
|
from lib import checks
|
2023-07-27 09:59:38 +00:00
|
|
|
|
2024-02-28 13:01:20 +00:00
|
|
|
logs = logging.getLogger('Racu.Core')
|
2023-07-27 09:59:38 +00:00
|
|
|
|
|
|
|
|
2023-07-27 10:02:59 +00:00
|
|
|
class PingCog(commands.Cog):
|
2024-02-28 13:01:20 +00:00
|
|
|
def __init__(self, client):
|
2024-02-28 13:11:22 +00:00
|
|
|
self.client = client
|
2023-07-27 09:59:38 +00:00
|
|
|
|
|
|
|
@commands.slash_command(
|
|
|
|
name="ping",
|
|
|
|
description="Simple status check.",
|
|
|
|
guild_only=True
|
|
|
|
)
|
2024-02-28 13:01:20 +00:00
|
|
|
@commands.check(checks.channel)
|
2023-07-27 09:59:38 +00:00
|
|
|
async def ping(self, ctx):
|
|
|
|
await ctx.respond(content=strings["ping"].format(ctx.author.name))
|
|
|
|
|
|
|
|
|
2024-02-28 13:01:20 +00:00
|
|
|
def setup(client):
|
|
|
|
client.add_cog(PingCog(client))
|