discord-bot/cogs/exampleCog.py
2021-05-18 18:17:31 -04:00

20 lines
No EOL
409 B
Python

import discord
from discord.ext import commands
class ExampleCog(commands.Cog):
def __init__(self, client):
self.client = client
# Events
@commands.Cog.listener()
async def on_ready(self):
print('Bot is online.')
# Commands
@commands.command()
async def ping(self, ctx):
await ctx.send('Pong!')
def setup(client):
client.add_cog(ExampleCog(client))