diff --git a/cogs/exampleCog.py b/cogs/pingCog.py similarity index 62% rename from cogs/exampleCog.py rename to cogs/pingCog.py index 19b2af8..d3aa6e5 100644 --- a/cogs/exampleCog.py +++ b/cogs/pingCog.py @@ -1,7 +1,7 @@ import discord from discord.ext import commands -class ExampleCog(commands.Cog): +class PingCog(commands.Cog): def __init__(self, client): self.client = client @@ -12,9 +12,9 @@ class ExampleCog(commands.Cog): print('Bot is online.') # Commands - @commands.command() + @commands.command(aliases=['latency']) async def ping(self, ctx): - await ctx.send('Pong!') + await ctx.send(f'Pong! {round(client.latency * 1000)}ms') def setup(client): - client.add_cog(ExampleCog(client)) \ No newline at end of file + client.add_cog(PingCog(client)) \ No newline at end of file