discord-bot/cogs/info/pingCog.py
rzmk 2b8e2345f9 First official build of bot!
Co-authored-by: iakrules <64628083+iakrules@noreply.github.com>
2021-08-01 14:36:34 -04:00

16 lines
No EOL
392 B
Python

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