From d6003027fdee8ff2cfa13c6bb90cc2dd627ef7ea Mon Sep 17 00:00:00 2001 From: Thomas Voss <57815710+Mango0x45@users.noreply.github.com> Date: Wed, 24 Jun 2020 09:29:19 +0200 Subject: Update utils.py --- cogs/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cogs/utils.py') diff --git a/cogs/utils.py b/cogs/utils.py index 90498e6..f45a5e7 100755 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -143,7 +143,12 @@ class Utils(commands.Cog): for coolKid in coolKids: if datetime.date.today() == coolKid[2]: - await coolKid[1].send(f'Happy Birthday {coolKid[0]}! You\'re a boomer now! :mango:') + try: + for i in range(self.tries): + await coolKid[1].send(f'Happy Birthday {coolKid[0]}! You\'re a boomer now! :mango:') + self.tries = 1 + except: + self.tries +=1 for word in badWords: if word in message.content.lower(): -- cgit v1.2.3