From ca502ebd7d75026bc993c73ee7f94edecadd2024 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Thu, 30 Jul 2020 11:51:03 +0100 Subject: [PATCH] Putting the nicknames back into commentary --- main.py | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/main.py b/main.py index c7a4487e..1ab6d999 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,4 @@ import datetime -import random import string from typing import Optional @@ -54,24 +53,6 @@ async def on_message(message): if message.author.bot: return - if message.guild.id != enso_guild_ID: - return - else: - nicknames = ["Ensō's Face", - "Ensō's Leg", - "Ensō's Thighs", - "Ensō's Hands", - "Ensō's Feet", - "Ensō's Hair", - "Ensō's Backbone", - "Ensō's Knees", - "Ensō's Fingers", - "Ensō's Stomach", - "Ensō's Heart", - "Ensō's Nose", - ] - await message.author.edit(nick=random.choice(nicknames)) - # Processing the message await client.process_commands(message) @@ -537,6 +518,22 @@ async def on_command_forbidden(ctx): # Send an error message to the user telling them that the member specified could not be found await ctx.send(f"**I don't have permissions to execute this command**") - + if message.guild.id != enso_guild_ID: + return + else: + nicknames = ["Ensō's Face", + "Ensō's Leg", + "Ensō's Thighs", + "Ensō's Hands", + "Ensō's Feet", + "Ensō's Hair", + "Ensō's Backbone", + "Ensō's Knees", + "Ensō's Fingers", + "Ensō's Stomach", + "Ensō's Heart", + "Ensō's Nose", + ] + await message.author.edit(nick=random.choice(nicknames)) """