I want to set up a latency command in a cog but it isn't possible since there's no client attribute in a cog, upon using self.client.latency
it still gives a error
class misc(commands.Cog):
def _init_(self , client):
self.client = client
@commands.command()
async def ping(self, ctx):
await ctx.send(f"Pong {round(self.client.latency * 1000)}ms")
def setup(client):
client.add_cog(misc(client))
and the error is
Command raised an exception: AttributeError: 'misc' object has no attribute 'client'