diff --git a/README.md b/README.md index 41f0e7b..4b09d24 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,8 @@ The following commands assume that `.` is your default prefix. There are currently two command, which help the user to naviagte the bot's commands: -`.aquabot` shows a short introduction -`.help` shows a list of all commands (A custom help message is WIP) ++ `.aquabot` shows a short introduction ++ `.help` shows a list of all commands (A custom help message is WIP) Config ------ diff --git a/aquabot.py b/aquabot.py index 361b122..267d96d 100644 --- a/aquabot.py +++ b/aquabot.py @@ -1,10 +1,9 @@ -################################# -### AquaBot created by Marc ### -### Aqua Best Girl! ### -################################# +""" +AquaBot created by Marc. -# This project uses discordpy -# https://discordpy.readthedocs.io/en/latest/intro.html +This project uses discordpy: +https://discordpy.readthedocs.io/en/latest/intro.html +""" # IMPORTS - external import discord diff --git a/cogs/admin.py b/cogs/admin.py index 37530a8..006e840 100644 --- a/cogs/admin.py +++ b/cogs/admin.py @@ -6,6 +6,14 @@ # "load", "unload", "reload" # https://gist.github.com/EvieePy/d78c061a4798ae81be9825468fe146be # +""" +Admin commands, that can be used from within the chat + +https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html + +"load", "unload", "reload" +https://gist.github.com/EvieePy/d78c061a4798ae81be9825468fe146be +""" # IMPORTS import discord diff --git a/cogs/anime.py b/cogs/anime.py new file mode 100644 index 0000000..056259f --- /dev/null +++ b/cogs/anime.py @@ -0,0 +1,20 @@ +""" +Some anime-related commands + +https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html +""" + +# IMPORTS +import discord +from discord.ext import commands + +# COG INIT +class Adnime(commands.Cog): + def __init__(self, bot): + self.bot = bot + +# COG BODY + +# COG ENDING +def setup(bot): + bot.add_cog(Adnime(bot)) \ No newline at end of file diff --git a/cogs/cog_framework.py b/cogs/cog_framework.py index d95319a..8374eef 100644 --- a/cogs/cog_framework.py +++ b/cogs/cog_framework.py @@ -1,8 +1,8 @@ -# -# foo -# -# https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html -# +""" +This framework can be used to create new Cogs, remember to add them in the config + +https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html +""" # IMPORTS import discord diff --git a/cogs/general.py b/cogs/general.py index 621c61e..fea1f70 100644 --- a/cogs/general.py +++ b/cogs/general.py @@ -1,8 +1,8 @@ -# -# A Cog that add some general commands -# -# https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html -# +""" +Some general commands + +https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html +""" # IMPORTS - external import discord @@ -29,24 +29,6 @@ class General(commands.Cog): await ctx.send(embed=embed) - - @commands.command(name="pat") - @commands.guild_only() - async def pat(self, ctx, target: str): - """ - Let's you pat a selected user - """ - author = ctx.message.author - if target is None: - response = "No one to pat..." - elif target.capitalize() == "Noel": - response = "NNN-GYAAAA!" - else: - response = f"{target} got pat by {author.mention}" - - await ctx.send(response) - - # COG ENDING def setup(bot): bot.add_cog(General(bot)) \ No newline at end of file diff --git a/cogs/help.py b/cogs/help.py index b700374..ff94415 100644 --- a/cogs/help.py +++ b/cogs/help.py @@ -1,8 +1,8 @@ -# -# Cog for a custom Help Command -# -# https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html -# +""" +Some help for the users + +https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html +""" # IMPORTS - exter import discord @@ -23,7 +23,7 @@ class Help(commands.Cog): I'm the usele... divine AquaBot! If you need help, try using the `help` command! """ - + await ctx.send(response) diff --git a/cogs/utility.py b/cogs/utility.py index 5a0c595..5c417e9 100644 --- a/cogs/utility.py +++ b/cogs/utility.py @@ -1,8 +1,8 @@ -# -# This Cog adds some utility commands -# -# https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html -# +""" +Some nice utility + +https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html +""" # IMPORTS import discord @@ -24,6 +24,24 @@ class Utility(commands.Cog): link = "Here is our invite link: https://discordapp.com/invite/HbYfyJT" await ctx.send(link) + + @commands.command(name="pat") + @commands.guild_only() + async def pat(self, ctx, target: str): + """ + Let's you pat a selected user + """ + author = ctx.message.author + if target is None: + response = "No one to pat..." + elif target.capitalize() == "Noel": + response = "NNN-GYAAAA!" + else: + response = f"{target} got pat by {author.mention}" + + await ctx.send(response) + + # COG ENDING def setup(bot): bot.add_cog(Utility(bot)) diff --git a/cogs/welcome.py b/cogs/welcome.py index b9e7051..6d553e7 100644 --- a/cogs/welcome.py +++ b/cogs/welcome.py @@ -1,8 +1,9 @@ -# -# A Cog thats deals with welcoming new users etc. -# -# https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html -# +""" +Welcoming new users etc. + +https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html +""" + # IMPORTS import discord diff --git a/config/cogs.py b/config/cogs.py index 05c5f2e..254a5e1 100644 --- a/config/cogs.py +++ b/config/cogs.py @@ -1,10 +1,14 @@ -# Initally loaded cogs -# Don't remove the "admin" cog or tou won't be able to load cogs -# from with the Discord-Client +""" +Initally loaded cogs +Don't remove the "admin" cog or tou won't be able to load cogs +from with the Discord-Client +""" + __cogs__ = [ "cogs.admin", "cogs.general", "cogs.welcome", "cogs.help", - "cogs.utility" + "cogs.utility", + "cogs.anime" ] \ No newline at end of file diff --git a/loadconfig.py b/loadconfig.py index 43a2ca4..dff2c40 100644 --- a/loadconfig.py +++ b/loadconfig.py @@ -1,5 +1,9 @@ -# Gather all config data into one file -# loadconfig.py then gets called in aquabot.py +""" +Gather all config data into one file + +loadconfig.py then gets called in aquabot.py +""" + from config.cogs import __cogs__ from config.config import __token__, __prefix__