From 1295811bd01f9fe07888b99d265b7ed0fc62f305 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Tue, 2 Jun 2020 13:02:41 +0100 Subject: [PATCH] Adding hug command, trying to test pinging --- EnsoBot.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/EnsoBot.py b/EnsoBot.py index 497babd3..7862cdd7 100644 --- a/EnsoBot.py +++ b/EnsoBot.py @@ -6,21 +6,18 @@ from discord.ext.commands import BucketType, cooldown # Bot Prefix client = commands.Bot(command_prefix='~') + # Bot Status on Discord @client.event async def on_ready(): print('Bot is ready.') await client.change_presence(activity=discord.Game(name='Reading Yaoi')) -@client.event -@commands.has_any_role('Hamothy') -async def best(message): - # we do not want the bot to reply to itself - if message.author == client.user: - return - myid = '<@154840866496839680>' - await client.send_message(message.channel, ' : %s is the best ' % myid) +@client.event(aliases=["Hug"]) +@commands.has_any_role('Hamothy') +async def Hug(self, ctx): + await self.bot.say("hugs {}".format(ctx.message.author.mention())) # Bot ~Ping command in milliseconds @@ -158,7 +155,7 @@ async def Kakashi(ctx): await ctx.send(embed=embed) -#Bot Event for handling cooldown error +# Bot Event for handling cooldown error @client.event async def on_command_error(ctx, error): if isinstance(error, commands.CommandOnCooldown):