First working version

This commit is contained in:
CramMK
2020-01-18 04:13:57 +01:00
parent 7e805ff13a
commit 818bafc604
14 changed files with 58 additions and 652 deletions

View File

@@ -20,7 +20,7 @@ class AdminCog(commands.Cog):
# used as "load cogs.COGNAME"
@commands.command(name="load", hidden=True)
@commands.is_owner()
async def cog_load(self, ctx, *, cog: str):
async def load(self, ctx, *, cog: str):
try:
self.bot.load_extension(cog)
@@ -33,7 +33,7 @@ class AdminCog(commands.Cog):
# used as "unload cogs.COGNAME"
@commands.command(name="unload", hidden=True)
@commands.is_owner()
async def cog_unload(self, ctx, *, cog: str):
async def unload(self, ctx, *, cog: str):
try:
self.bot.unload_extension(cog)
@@ -46,7 +46,7 @@ class AdminCog(commands.Cog):
# used as "reload cogs.COGNAME"
@commands.command(name="reload", hidden=True)
@commands.is_owner()
async def cog_reload(self, ctx, *, cog: str):
async def reload(self, ctx, *, cog: str):
try:
self.bot.unload_extension(cog)
@@ -59,4 +59,4 @@ class AdminCog(commands.Cog):
# COG ENDING
def setup(bot):
bot.add_cog(AdminCog(bot))
bot.add_cog(AdminCog(bot))

View File

@@ -36,7 +36,7 @@ class GeneralCog(commands.Cog):
author = ctx.message.author
if target is None:
response = "No one to pat..."
else if target.capitalize == "Noel":
elif target == "Noel":
response = "NNN-GYAAAA!"
else:
response = f"{target.mention} got pat by {author.mention}"
@@ -46,4 +46,4 @@ class GeneralCog(commands.Cog):
# COG ENDING
def setup(bot):
bot.add_cog(GeneralCog(bot))
bot.add_cog(GeneralCog(bot))

View File

@@ -4,7 +4,7 @@
# https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html
#
# IMPORTS
# IMPORTS - exter
import discord
from discord.ext import commands
@@ -15,17 +15,17 @@ class HelpCog(commands.Cog):
# COG BODY
@commands.command(
name="aquabot"
name="aquabot",
description="Prints a short help for new users"
)
async def aquabot(self, ctx):
await ctx.send("""
I'm the usele... divine AquaBot!\n
If you need help, try using the `help` command!\n
I'm the usele... divine AquaBot!
If you need help, try using the `help` command!
""")
# COG ENDING
def setup(bot):
bot.add_cog(HelpCog(bot))
bot.add_cog(HelpCog(bot))

View File

@@ -19,7 +19,7 @@ class WelcomeCog(commands.Cog):
channel = member.guild.system_channel
text = f"Welcome {member.mention} to our useless Discord!"
if channel is Not None:
if channel is not None:
await channel.send(text)
@@ -29,8 +29,8 @@ class WelcomeCog(commands.Cog):
)
async def hello(self, ctx):
await ctx.send(f"Hello {ctx.author}!")
await ctx.send(f"Hello {ctx.author.mention}!")
# COG ENDING
def setup(bot):
bot.add_cog(WelcomeCog(bot))
bot.add_cog(WelcomeCog(bot))