Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
alex5nader committed Feb 27, 2021
2 parents c2dd05c + c3e057d commit fa54b93
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions example.py → cogs/example.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import discord
from discord.ext import commands

#EXAMPLE FORMAT OF THE FILE TO PLACE YOUR COMMANDS
class Classname(commands.Cog):
#Creates class in which to place commands
def __init__(self, client):
self.client = client

#PUT THIS FOR EVENTS (replaces @client.event())
@commands.Cog.listener()

#PUT THIS ABOVE ANY COMMAND Y'ALL WANNA MAKE (replaces @client.command())
@commands.command()

#PUT THIS AT THE END OF YOUR PYTHON FILE
def setup(client):
client.add_cog(Classname(client))
#IMPORT THESE
import discord
from discord.ext import commands

#EXAMPLE FORMAT OF THE FILE TO PLACE YOUR COMMANDS
class Classname(commands.Cog):
#CREATES CLASS IN WHICH YOU PLACE YOUR COMMANDS
def __init__(self, client):
self.client = client

#PUT THIS FOR EVENTS (replaces @client.event())
@commands.Cog.listener()

#PUT THIS ABOVE ANY COMMAND Y'ALL WANNA MAKE (replaces @client.command())
@commands.command()

#PUT THIS AT THE END OF YOUR PYTHON FILE
def setup(client):
client.add_cog(Classname(client))

0 comments on commit fa54b93

Please sign in to comment.