initial bot setup
This commit is contained in:
parent
3f8135b81e
commit
91cb11d20e
5 changed files with 45 additions and 1 deletions
20
cogs/exampleCog.py
Normal file
20
cogs/exampleCog.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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))
|
||||
Loading…
Add table
Add a link
Reference in a new issue