code: async def on_raw_invite(self, message):
          
          nick, metadata = self._parse_user(message.source)
          self._sync_user(nick, metadata)
  
          target, channel = message.params
          target, metadata = self._parse_user(target)
  
          if self.is_same_nick(self.nickname, target):
              await self.on_invite(channel, nick)
          else:
              await self.on_user_invite(target, channel, nick)
docs: INVITE command.