moderation cog discord.py code example
Example: discord.py cog
from discord.ext import commands
class Ping(commands.Cog):
"""Receives ping commands"""
@commands.command()
async def ping(self, ctx: commands.Context):
await ctx.send("Pong")
def setup(bot: commands.Bot):
bot.add_cog(Ping())