From 5ca31417079f327d38dd9772f961bcacc1bbc837 Mon Sep 17 00:00:00 2001 From: bobloy Date: Thu, 4 Oct 2018 13:22:40 -0400 Subject: [PATCH] Don't DM everyone and spelling error --- planttycoon/planttycoon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/planttycoon/planttycoon.py b/planttycoon/planttycoon.py index 411655d..a41cf12 100644 --- a/planttycoon/planttycoon.py +++ b/planttycoon/planttycoon.py @@ -1336,9 +1336,9 @@ class PlantTycoon: async def check_completion(self): while 'PlantTycoon' in self.bot.cogs: now = int(time.time()) - message = None users = await self.config.all_users() for user_id in users: + message = None user = self.bot.get_user(user_id) gardener = await self._gardener(user) if gardener.current: @@ -1352,11 +1352,11 @@ class PlantTycoon: if badge not in gardener.badges: gardener.badges.append(badge) message = 'Your plant made it! ' \ - 'You are rewarded with the **{}** badge and you have recieved **{}** Thneeds.'.format( + 'You are rewarded with the **{}** badge and you have received **{}** Thneeds.'.format( badge, reward) if health < 0: message = 'Your plant died!' - if message: + if message is not None: await user.send(message) gardener.current = {} await gardener._save_gardener()