Better Framework, new cog-files

This commit is contained in:
CramMK
2020-01-22 22:29:16 +01:00
parent 2453f84fa2
commit 10c65cfda4
11 changed files with 94 additions and 58 deletions

View File

@@ -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))