A clean and expandable Python Discord bot template using discord.py with support for automatic cog loading.
-
Easy-to-edit bot structure
-
Automatic loading of cogs from the
./cogsfolder -
Example cog included
-
Commands:
!pingβ Check bot latency!uptimeβ Shows how long the bot has been online
π¦ your-bot
βββ main.py
βββ cogs
β βββ 1.py
β βββ (add more cogs here)
βββ Requirements.txt
Inside main.py:
TOKEN = "YOUR_BOT_TOKEN_HERE"Run the main script:
python main.pyPut a file inside the cogs folder:
from discord.ext import commands
class Example(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def hello(self, ctx):
await ctx.send("Hello from a cog!")
async def setup(bot):
await bot.add_cog(Example(bot))If you want more commands, features, or help setting up hosting, just ask!
Star it, share it, or expand it with your own cogs!