basic setup
This commit is contained in:
commit
b3508664d3
9 files changed
+186
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
from discord import app_commands
|
||||
|
||||
class Ping(commands.Cog):
|
||||
def __init__(self, bot: commands.Bot):
|
||||
self.bot = bot
|
||||
|
||||
@app_commands.command(name="ping", description='Responds with "pong!"')
|
||||
async def ping(self, interaction: discord.Interaction):
|
||||
latency = round(self.bot.latency * 1000)
|
||||
await interaction.response.send_message(f"Pong! ({latency}ms)")
|
||||
|
||||
|
||||
async def setup(bot: commands.Bot):
|
||||
await bot.add_cog(Ping(bot))
|
||||
Reference in new issue
Block a user