discord-bot/cogs/info/pingCog.py
2021-06-07 21:47:23 -04:00

15 lines
No EOL
356 B
Python

import discord
from discord.ext import commands
class PingCog(commands.Cog):
def __init__(self, client):
self.client = client
# Commands
@commands.command(aliases=['latency'])
async def ping(self, ctx):
await ctx.send(f'Pong! {round(self.client.latency * 1000)}ms')
def setup(client):
client.add_cog(PingCog(client))