19 lines
459 B
Python
19 lines
459 B
Python
# cmd_twitch/ping.py
|
|
from twitchio.ext import commands
|
|
from cmd_common import common_commands as cc
|
|
|
|
def setup(bot):
|
|
"""
|
|
Registers the '!ping' command for Twitch.
|
|
"""
|
|
@bot.command(name="ping")
|
|
async def cmd_ping(ctx: commands.Context):
|
|
"""
|
|
Checks the bot's uptime and latency.
|
|
|
|
Usage:
|
|
- !ping -> Returns the bot's uptime and latency.
|
|
"""
|
|
result = cc.ping()
|
|
await ctx.reply(result)
|