Files
iiLarsH 617eaa047d Basic functionality
!roll
!ping

Hiding token
2023-04-25 20:35:44 +02:00

19 lines
457 B
Python

import discord
from discord.ext import commands
class Ping(commands.Cog):
def __init__(self, client):
self.client = client
@commands.Cog.listener()
async def on_ready(self):
print("Ping.py is ready")
@commands.command()
async def ping(self, ctx):
bot_latency = round(self.client.latency * 1000)
await ctx.send(f"pong! {bot_latency}ms.")
async def setup(client):
await client.add_cog(Ping(client))