@@ -519,7 +519,7 @@ async def on_connect(self):
519519 await self .api .validate_database_connection ()
520520 except Exception :
521521 logger .debug ("Logging out due to failed database connection." )
522- return await self .logout ()
522+ return await self .close ()
523523
524524 logger .debug ("Connected to gateway." )
525525 await self .config .refresh ()
@@ -534,7 +534,7 @@ async def on_ready(self):
534534
535535 if self .guild is None :
536536 logger .error ("Logging out due to invalid GUILD_ID." )
537- return await self .logout ()
537+ return await self .close ()
538538
539539 logger .line ()
540540 logger .debug ("Client ready." )
@@ -640,7 +640,7 @@ async def convert_emoji(self, name: str) -> str:
640640 ctx = SimpleNamespace (bot = self , guild = self .modmail_guild )
641641 converter = commands .EmojiConverter ()
642642
643- if name not in UNICODE_EMOJI :
643+ if name not in UNICODE_EMOJI [ 'en' ] :
644644 try :
645645 name = await converter .convert (ctx , name .strip (":" ))
646646 except commands .BadArgument as e :
@@ -1607,7 +1607,7 @@ async def autoupdate(self):
16071607 embed .set_footer (text = f"Updating Modmail v{ self .version } " f"-> v{ latest .version } " )
16081608 if self .config ["update_notifications" ]:
16091609 await channel .send (embed = embed )
1610- await self .logout ()
1610+ return await self .close ()
16111611
16121612 async def before_autoupdate (self ):
16131613 await self .wait_for_connected ()
0 commit comments