aboutsummaryrefslogtreecommitdiffstats
path: root/bot/cogs/template.py
diff options
context:
space:
mode:
authorGravatar Marko Kovačević <[email protected]>2018-10-03 19:36:12 +0200
committerGravatar Marko Kovačević <[email protected]>2018-10-03 19:36:12 +0200
commita135873590b426c566b9d329daf0066fd5426dc3 (patch)
treecfeabb213862a417e386fd9a7c0c1b5b9bbd3454 /bot/cogs/template.py
parentAdd some comments and docstrings documenting the code and replacing minor iss... (diff)
Fix improper docstrings and comments.
Diffstat (limited to 'bot/cogs/template.py')
-rw-r--r--bot/cogs/template.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/bot/cogs/template.py b/bot/cogs/template.py
index da92f6b5..caac3412 100644
--- a/bot/cogs/template.py
+++ b/bot/cogs/template.py
@@ -1,13 +1,12 @@
-from os import system
-
-
from discord.ext import commands
-"""A template cog that contains examples of commands and command groups."""
+class Template:
+ """
+ A template cog that contains examples of commands and command groups.
+ """
-class Template:
def __init__(self, bot):
self.bot = bot
@@ -15,15 +14,15 @@ class Template:
async def repository(self, ctx):
await ctx.send('https://github.com/discord-python/hacktoberbot')
- # A command group with the name git. You can now create sub-commands such as git commit.
@commands.group(name='git', invoke_without_command=True)
async def github(self, ctx):
+ # A command group with the name git. You can now create sub-commands such as git commit.
await ctx.send('Resources to learn **Git**: https://try.github.io/.')
- # A command that belongs to the git command group. Invoked using git commit.
@github.command()
async def commit(self, ctx):
- system('git commit -m "A huge commit adding many revolutionary features!"')
+ # A command that belongs to the git command group. Invoked using git commit.
+ await ctx.send('`git commit -m "First commit"` commits tracked changes.')
# Required in order to load the cog, use the class name in the add_cog function.