Basic functionality

!roll
!ping

Hiding token
This commit is contained in:
2023-04-25 20:35:44 +02:00
parent 796be99986
commit 617eaa047d
4 changed files with 88 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
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))